diff --git a/leap-upgrades/lib/vars.sh b/leap-upgrades/lib/vars.sh index add340d4..1b4dd18a 100644 --- a/leap-upgrades/lib/vars.sh +++ b/leap-upgrades/lib/vars.sh @@ -26,7 +26,10 @@ export MITAKA_RELEASE="${MITAKA_RELEASE:-mitaka-eol}" export NEWTON_RELEASE="${NEWTON_RELEASE:-14.2.7}" ## Environment Vars ------------------------------------------------------------------ +# main path changes with releases leaping export MAIN_PATH="${MAIN_PATH:-/opt/openstack-ansible}" +# this is the final folder for redeploy. +export REDEPLOY_OA_FOLDER="${REDEPLOY_OA_FOLDER:-/opt/openstack-ansible}" export SYSTEM_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../ && pwd )" export UPGRADE_UTILS="${UPGRADE_UTILS:-${SYSTEM_PATH}/upgrade-utilities}" diff --git a/leap-upgrades/migrations.sh b/leap-upgrades/migrations.sh index b2c62cd8..b5df8d96 100755 --- a/leap-upgrades/migrations.sh +++ b/leap-upgrades/migrations.sh @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTICE: To run this in an automated fashion run the script via -# root@HOSTNAME:/opt/openstack-ansible# echo "YES" | bash scripts/run-upgrade.sh - ## Shell Opts ---------------------------------------------------------------- set -e -u @@ -32,7 +29,9 @@ if [[ ! -f "/opt/leap42/openstack-ansible-poweroff.leap" ]]; then fi RUN_TASKS=() RUN_TASKS+=("${UPGRADE_UTILS}/power-down.yml") - run_items "/opt/openstack-ansible" + # This run_items doesn't care about which folder it runs in, because just + # one task is used, and it's not in the folder + run_items "${REDEPLOY_OA_FOLDER}" tag_leap_success "poweroff" fi diff --git a/leap-upgrades/prep.sh b/leap-upgrades/prep.sh index 8abc7c95..2012196d 100755 --- a/leap-upgrades/prep.sh +++ b/leap-upgrades/prep.sh @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTICE: To run this in an automated fashion run the script via -# root@HOSTNAME:/opt/openstack-ansible# echo "YES" | bash scripts/run-upgrade.sh - ## Shell Opts ---------------------------------------------------------------- set -e -u diff --git a/leap-upgrades/re-deploy.sh b/leap-upgrades/re-deploy.sh index 9e3d5ece..192a5e06 100755 --- a/leap-upgrades/re-deploy.sh +++ b/leap-upgrades/re-deploy.sh @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTICE: To run this in an automated fashion run the script via -# root@HOSTNAME:/opt/openstack-ansible# echo "YES" | bash scripts/run-upgrade.sh - ## Shell Opts ---------------------------------------------------------------- set -e -u @@ -142,5 +139,5 @@ if [[ ${REDEPLOY_EXTRA_SCRIPT:-} ]]; then notice "Running extra script before re-deploy" source ${REDEPLOY_EXTRA_SCRIPT} fi -run_items "/opt/openstack-ansible" +run_items "${REDEPLOY_OA_FOLDER}" ### Run the redeploy tasks diff --git a/leap-upgrades/run-stages.sh b/leap-upgrades/run-stages.sh index 67ec75c4..a241dcfd 100755 --- a/leap-upgrades/run-stages.sh +++ b/leap-upgrades/run-stages.sh @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTICE: To run this in an automated fashion run the script via -# root@HOSTNAME:/opt/openstack-ansible# echo "YES" | bash scripts/run-upgrade.sh - ## Shell Opts ---------------------------------------------------------------- set -e -u diff --git a/leap-upgrades/upgrade.sh b/leap-upgrades/upgrade.sh index 0577b21c..b1175cde 100755 --- a/leap-upgrades/upgrade.sh +++ b/leap-upgrades/upgrade.sh @@ -14,9 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# NOTICE: To run this in an automated fashion run the script via -# root@HOSTNAME:/opt/openstack-ansible# echo "YES" | bash scripts/run-upgrade.sh - ## Shell Opts ---------------------------------------------------------------- set -e -u @@ -130,6 +127,6 @@ if [[ ! -f "/opt/leap42/openstack-ansible-upgrade-hostupgrade.leap" ]]; then RUN_TASKS=() RUN_TASKS+=("${UPGRADE_UTILS}/pip-conf-purge.yml") RUN_TASKS+=("openstack-hosts-setup.yml") - run_items "/opt/openstack-ansible" + run_items "${REDEPLOY_OA_FOLDER}" tag_leap_success "upgrade-hostupgrade" fi