Remove double warning from run-upgrade

The reality is that the upgrade script is always in
development, as is all open source software. Instead
of having this extra warning we just have one which
provides a suitable warning to use this in a test
environment first.

Also, we remove the set -v because the output of the
whole script is not very helpful when executing or
debugging.

Change-Id: I8e23bfacf131a0c7d5c3716437dbfecb896bbb70
This commit is contained in:
Jesse Pretorius 2018-04-09 17:47:08 +01:00 committed by Jesse Pretorius (odyssey4me)
parent 932e01cf45
commit 82d618d790
2 changed files with 11 additions and 21 deletions

View File

@ -202,11 +202,6 @@ if [[ "${ACTION}" == "upgrade" ]]; then
# Checkout the original HEAD we started with
git checkout ${UPGRADE_TARGET_BRANCH}
# There is a protection in the run-upgrade script
# to prevent people doing anything silly. We need
# to bypass that for an automated test.
export I_REALLY_KNOW_WHAT_I_AM_DOING=true
# Unset environment variables used by the bootstrap-ansible
# script to allow newer versions of Ansible and global
# requirements to be installed.

View File

@ -20,7 +20,7 @@
## Shell Opts ----------------------------------------------------------------
set -e -u -v
set -e -u
## Vars ----------------------------------------------------------------------
@ -33,9 +33,6 @@ export MAIN_PATH="$(dirname "${SCRIPTS_PATH}")"
# The path to find all the upgrade playbooks
export UPGRADE_PLAYBOOKS="${SCRIPTS_PATH}/upgrade-utilities/playbooks"
# The toggle which guards against using this script prematurely
export I_REALLY_KNOW_WHAT_I_AM_DOING=${I_REALLY_KNOW_WHAT_I_AM_DOING:-"false"}
# The expected source series name
export SOURCE_SERIES="pike"
@ -127,12 +124,21 @@ function pre_flight {
# Notify the user.
echo -e "
This script will perform a ${SOURCE_SERIES^} to ${TARGET_SERIES^} upgrade.
Once you start the upgrade there's no going back.
Once you start the upgrade there is no going back.
Note that the upgrade targets impacting the data
plane as little as possible, but assumes that the
control plane can experience some down time.
This script executes a one-size-fits-all upgrade,
and given that the tests implemented for it are
not monitored as well as those for a greenfield
environment, the results may vary with each release.
Please use it against a test environment with your
configurations to validate whether it suits your
needs and does a suitable upgrade.
Are you ready to perform this upgrade now?
"
@ -145,20 +151,9 @@ function pre_flight {
fi
}
function exit_early {
echo -e "
The upgrade script is still under active development and should not be
run at this time. For test environments the early exit of the script can
skipped by executing ``export I_REALLY_KNOW_WHAT_I_AM_DOING=true`` before
``run-upgrade.sh``.
"
exit 99
}
## Main ----------------------------------------------------------------------
function main {
[[ "${I_REALLY_KNOW_WHAT_I_AM_DOING}" = true ]] || exit_early
pre_flight
check_for_current