Merge "Link the current deployed release on a leapfrog"

This commit is contained in:
Zuul 2017-12-14 22:51:27 +00:00 committed by Gerrit Code Review
commit d4dbea93a2
2 changed files with 17 additions and 1 deletions

View File

@ -52,6 +52,19 @@ function check_for_todolist {
fi
}
function check_for_release {
if [[ -v RELEASE ]]; then
notice "RELEASE is set, continuing..."
else
notice "Please export RELEASE variable before continuing"
notice "This variable reflects the release version being leaped"
notice "from. i.e. value of KILO_RELEASE, LIBERTY_RELEASE, etc."
notice ""
notice "example: export RELEASE=\"liberty-eol\""
exit 99
fi
}
function run_lock {
set +e

View File

@ -24,11 +24,14 @@ source lib/functions.sh
## Ensure UPGRADES_TO_TODOLIST is set
check_for_todolist
## Ensure RELEASE is set
check_for_release
### Run the DB migrations
# Stop the services to ensure DB and application consistency
if [[ ! -f "/opt/leap42/openstack-ansible-poweroff.leap" ]]; then
if [ -e "/opt/openstack-ansible" ]; then
link_release "/opt/leap42/openstack-ansible-${KILO_RELEASE}"
link_release "/opt/leap42/openstack-ansible-${RELEASE}"
fi
RUN_TASKS=()
RUN_TASKS+=("${UPGRADE_UTILS}/power-down.yml")