Merge "Adjust logic to allow for redeploy retry on failure"
This commit is contained in:
commit
db2f2759a6
@ -131,6 +131,17 @@ function bootstrap_recent_ansible {
|
||||
popd
|
||||
}
|
||||
|
||||
function resume_incomplete_leap {
|
||||
echo
|
||||
notice "Detected previous leap attempt to ${CODE_UPGRADE_FROM}."
|
||||
notice 'Would you like to reattempt this leap upgrade?'
|
||||
read -p 'Enter "YES" to continue:' RUSURE
|
||||
if [[ "${RUSURE}" != "YES" ]]; then
|
||||
notice "Quitting..."
|
||||
exit 99
|
||||
fi
|
||||
}
|
||||
|
||||
function validate_upgrade_input {
|
||||
|
||||
echo
|
||||
@ -278,7 +289,9 @@ function pre_flight {
|
||||
|
||||
discover_code_version
|
||||
|
||||
if [ "${VALIDATE_UPGRADE_INPUT}" == "TRUE" ]; then
|
||||
if [[ -f "${CONFIG_DIR}/upgrade-leap/redeploy-started.complete" && ! -f "${CONFIG_DIR}/upgrade-leap/osa-leap.complete" ]]; then
|
||||
resume_incomplete_leap
|
||||
elif [ "${VALIDATE_UPGRADE_INPUT}" == "TRUE" ]; then
|
||||
validate_upgrade_input
|
||||
fi
|
||||
|
||||
|
@ -21,6 +21,12 @@ set -e -u
|
||||
source lib/vars.sh
|
||||
source lib/functions.sh
|
||||
|
||||
### Set lock file to notate redeploy has started
|
||||
# Notate that redeploy has started, if it fails midway, it can be
|
||||
# resumed from the starting script without getting prompted to
|
||||
# set the version again.
|
||||
touch /etc/openstack_deploy/upgrade-leap/redeploy-started.complete
|
||||
|
||||
### Run the redeploy tasks
|
||||
# Forget about the old neutron agent container in inventory.
|
||||
# This is done to maximize uptime by leaving the old systems in
|
||||
|
Loading…
Reference in New Issue
Block a user