Skip to content

Commit

Permalink
Merge pull request #326 from antonym/run_osa_bootstrap
Browse files Browse the repository at this point in the history
Bootstrap OSA if it hasn't been done before
  • Loading branch information
antonym authored Feb 1, 2019
2 parents a513c93 + 19c7268 commit ef73413
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 ef73413

Please sign in to comment.