Correct re-deploy hooks to allow unset variables
The patch https://review.openstack.org/498167 added hooks which failed due to the '-u' set in the script which does not tolerate unset variables. The script has been modified to use parameter expansion to allow each hook to be detected properly as being set without failing due to unset variables. Change-Id: Ic7dd889a2f00de8a59239abb37b2d451e854ef63
This commit is contained in:
parent
e3eb50bb16
commit
53d548dfba
@ -42,7 +42,7 @@ link_release "/opt/leap42/openstack-ansible-${NEWTON_RELEASE}"
|
||||
RUN_TASKS=()
|
||||
|
||||
# Pre-setup-hosts hook
|
||||
if [ -n "$PRE_SETUP_HOSTS_HOOK" ]; then
|
||||
if [[ -n ${PRE_SETUP_HOSTS_HOOK+x} ]]; then
|
||||
RUN_TASKS+=("$PRE_SETUP_HOSTS_HOOK")
|
||||
fi
|
||||
|
||||
@ -62,12 +62,12 @@ RUN_TASKS+=("lxc-hosts-setup.yml")
|
||||
RUN_TASKS+=("lxc-containers-create.yml")
|
||||
|
||||
# Post-setup-hosts hook
|
||||
if [ -n "$POST_SETUP_HOSTS_HOOK" ]; then
|
||||
if [[ -n ${POST_SETUP_HOSTS_HOOK+x} ][; then
|
||||
RUN_TASKS+=("$POST_SETUP_HOSTS_HOOK")
|
||||
fi
|
||||
|
||||
# Pre-setup-infrastructure hook
|
||||
if [ -n "$PRE_SETUP_INFRASTRUCTURE_HOOK" ]; then
|
||||
if [[ -n ${PRE_SETUP_INFRASTRUCTURE_HOOK+x} ]]; then
|
||||
RUN_TASKS+=("$PRE_SETUP_INFRASTRUCTURE_HOOK")
|
||||
fi
|
||||
|
||||
@ -87,12 +87,12 @@ RUN_TASKS+=("rsyslog-install.yml")
|
||||
RUN_TASKS+=("${UPGRADE_UTILS}/db-force-upgrade.yml")
|
||||
|
||||
# Post-setup-infrastructure hook
|
||||
if [ -n "$POST_SETUP_INFRASTRUCTURE_HOOK" ]; then
|
||||
if [[ -n ${POST_SETUP_INFRASTRUCTURE_HOOK+x} ]]; then
|
||||
RUN_TASKS+=("$POST_SETUP_INFRASTRUCTURE_HOOK")
|
||||
fi
|
||||
|
||||
# Pre-setup-openstack hook
|
||||
if [ -n "$PRE_SETUP_OPENSTACK_HOOK" ]; then
|
||||
if [[ -n ${PRE_SETUP_OPENSTACK_HOOK+x} ]; then
|
||||
RUN_TASKS+=("$PRE_SETUP_OPENSTACK_HOOK")
|
||||
fi
|
||||
|
||||
@ -132,7 +132,7 @@ RUN_TASKS+=("os-sahara-install.yml")
|
||||
RUN_TASKS+=("${UPGRADE_UTILS}/post-redeploy-cleanup.yml")
|
||||
|
||||
# Post-setup-openstack hook
|
||||
if [ -n "$POST_SETUP_OPENSTACK_HOOK" ]; then
|
||||
if [[ -n ${POST_SETUP_OPENSTACK_HOOK+x} ]]; then
|
||||
RUN_TASKS+=("$POST_SETUP_OPENSTACK_HOOK")
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user