diff --git a/incremental/lib/functions.sh b/incremental/lib/functions.sh index 87161392..b278d720 100755 --- a/incremental/lib/functions.sh +++ b/incremental/lib/functions.sh @@ -129,6 +129,23 @@ function checkout_openstack_ansible { fi } +function ensure_osa_bootstrap { + if [ ! -f "/etc/openstack_deploy/osa_bootstrapped.complete" ]; then + # purge osa and wrapper so that we start fresh without RPC-O settings + if [ -d "/opt/openstack-ansible" ]; then + rm -rf /opt/openstack-ansible + rm -f /usr/local/bin/openstack-ansible + rm -f /usr/local/bin/openstack-ansible.rc + fi + checkout_openstack_ansible + pushd /opt/openstack-ansible + scripts/bootstrap-ansible.sh + popd + touch /etc/openstack_deploy/osa_bootstrapped.complete + fi +} + + function configure_rpc_openstack { rsync -av --delete /opt/rpc-openstack/etc/openstack_deploy/group_vars /etc/openstack_deploy/ rm -rf /opt/rpc-ansible @@ -190,12 +207,6 @@ function prepare_ocata { openstack-ansible db-migration-ocata.yml popd fi - # purge osa and wrapper so that we start fresh without RPC-O settings - if [ -d "/opt/openstack-ansible" ]; then - rm -rf /opt/openstack-ansible - rm -f /usr/local/bin/openstack-ansible - rm -f /usr/local/bin/openstack-ansible.rc - fi } function prepare_pike { diff --git a/incremental/ubuntu16-upgrade-to-ocata.sh b/incremental/ubuntu16-upgrade-to-ocata.sh index 28cecc2a..de07263e 100755 --- a/incremental/ubuntu16-upgrade-to-ocata.sh +++ b/incremental/ubuntu16-upgrade-to-ocata.sh @@ -32,6 +32,7 @@ prepare_ocata checkout_rpc_openstack checkout_openstack_ansible +ensure_osa_bootstrap if [[ "$SKIP_INSTALL" == "yes" ]]; then exit 0 diff --git a/incremental/ubuntu16-upgrade-to-pike.sh b/incremental/ubuntu16-upgrade-to-pike.sh index 37b583c1..e417eb5e 100755 --- a/incremental/ubuntu16-upgrade-to-pike.sh +++ b/incremental/ubuntu16-upgrade-to-pike.sh @@ -30,6 +30,7 @@ echo "Starting Ocata to Pike Upgrade..." checkout_rpc_openstack configure_rpc_openstack +ensure_osa_bootstrap prepare_pike if [[ "$SKIP_INSTALL" == "yes" ]]; then diff --git a/incremental/ubuntu16-upgrade-to-queens.sh b/incremental/ubuntu16-upgrade-to-queens.sh index e34005a8..9e5e6277 100755 --- a/incremental/ubuntu16-upgrade-to-queens.sh +++ b/incremental/ubuntu16-upgrade-to-queens.sh @@ -30,6 +30,7 @@ echo "Starting Pike to Queens Upgrade..." checkout_rpc_openstack configure_rpc_openstack +ensure_osa_bootstrap prepare_queens run_upgrade diff --git a/incremental/ubuntu16-upgrade-to-rocky.sh b/incremental/ubuntu16-upgrade-to-rocky.sh index dfcd793a..36227117 100755 --- a/incremental/ubuntu16-upgrade-to-rocky.sh +++ b/incremental/ubuntu16-upgrade-to-rocky.sh @@ -30,6 +30,7 @@ echo "Starting Queens to Rocky Upgrade..." checkout_rpc_openstack configure_rpc_openstack +ensure_osa_bootstrap prepare_rocky run_upgrade