Improve Gating of leapfrog

Instead of relying on "echo YES| " in gating, we should re-use
an environment variable that bypasses the user validation.

This commit also adds logging of the extra step that was added
previously.

Change-Id: If5e986daa6404470d9d260032a24eb8cc17aa161
This commit is contained in:
Jean-Philippe Evrard 2017-05-31 15:12:09 +01:00
parent 75886594b0
commit 9d282388ac
2 changed files with 11 additions and 8 deletions

View File

@ -220,12 +220,14 @@ function pre_flight {
warning "Are you ready to perform this upgrade now?"
# Confirm the user is ready to upgrade.
read -p 'Enter "YES" to continue or anything else to quit: ' UPGRADE
if [ "${UPGRADE}" == "YES" ]; then
notice "Running LEAP Upgrade"
else
notice "Exiting, input wasn't YES"
exit 99
if [[ "${VALIDATE_UPGRADE_INPUT}" == "TRUE" ]]; then
read -p 'Enter "YES" to continue or anything else to quit: ' UPGRADE
if [ "${UPGRADE}" == "YES" ]; then
notice "Running LEAP Upgrade"
else
notice "Exiting, input wasn't YES"
exit 99
fi
fi
discover_code_version

View File

@ -91,8 +91,9 @@ RUN_TASKS+=("os-sahara-install.yml")
RUN_TASKS+=("${UPGRADE_UTILS}/post-redeploy-cleanup.yml")
# Loads a shell script that can be used to modify
# the RUN_TASKS behavior.
if [ ! -z ${REDEPLOY_EXTRA_SCRIPT} ]; then
source ${REDEPLOY_EXTRA_SCRIPT}
if [[ ! -z ${REDEPLOY_EXTRA_SCRIPT} ]]; then
notice "Running extra script before re-deploy"
source ${REDEPLOY_EXTRA_SCRIPT}
fi
run_items "/opt/openstack-ansible"
### Run the redeploy tasks