Skip to content

Commit

Permalink
Bootstrap OSA if it hasn't been done before
Browse files Browse the repository at this point in the history
Ensures OSA bootstrap is ran to overwrite any RPC-O
specific bootstraps.  Writes a file to ensure it's
done at least once to flip things over so that we
always have OSA openstack-ansible available.
  • Loading branch information
Antony Messerli committed Jan 31, 2019
1 parent a513c93 commit 19c7268
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
23 changes: 17 additions & 6 deletions incremental/lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions incremental/ubuntu16-upgrade-to-ocata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ prepare_ocata

checkout_rpc_openstack
checkout_openstack_ansible
ensure_osa_bootstrap

if [[ "$SKIP_INSTALL" == "yes" ]]; then
exit 0
Expand Down
1 change: 1 addition & 0 deletions incremental/ubuntu16-upgrade-to-pike.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions incremental/ubuntu16-upgrade-to-queens.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ echo "Starting Pike to Queens Upgrade..."

checkout_rpc_openstack
configure_rpc_openstack
ensure_osa_bootstrap
prepare_queens
run_upgrade

Expand Down
1 change: 1 addition & 0 deletions incremental/ubuntu16-upgrade-to-rocky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ echo "Starting Queens to Rocky Upgrade..."

checkout_rpc_openstack
configure_rpc_openstack
ensure_osa_bootstrap
prepare_rocky
run_upgrade

Expand Down

0 comments on commit 19c7268

Please sign in to comment.