From c61618fd576638e88f5a01bf094739c47feab4b6 Mon Sep 17 00:00:00 2001 From: marios Date: Fri, 4 Aug 2017 15:24:40 +0300 Subject: [PATCH] Download and run upgrade/deploy_steps_playbooks for upgrade For non controller upgrade add download and execution of the upgrade and deploy steps playbooks We may want to remove the tripleo_upgrade_node.sh completely Related-Bug: 1708115 Depends-On: Ib01b96a2c26721747d81d98e3d57c4c388663004 Change-Id: I534eb282ab5c32f62965930924f791fd2da755b1 --- scripts/upgrade-non-controller.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/upgrade-non-controller.sh b/scripts/upgrade-non-controller.sh index 8e7649e65..1686fc9d7 100755 --- a/scripts/upgrade-non-controller.sh +++ b/scripts/upgrade-non-controller.sh @@ -134,6 +134,17 @@ if [ -n "$UPGRADE_NODE" ]; then node_ip=$(nova show $UPGRADE_NODE | grep "ctlplane network" | awk '{print $5}') log "Executing $UPGRADE_SCRIPT on $node_ip" ssh $UPGRADE_NODE_USER@$node_ip sudo $UPGRADE_SCRIPT 2>&1 | tee -a $LOGFILE + log "Clearing any existing dir $UPGRADE_NODE and downloading config" + rm -rf $UPGRADE_NODE + openstack overcloud config download --config-dir "$UPGRADE_NODE" + config_dir=$(ls -1 $UPGRADE_NODE) + target_host=$(openstack server list | grep $UPGRADE_NODE | awk '{print $4}') + log "Starting the upgrade steps playbook run for $target_host from $UPGRADE_NODE/$config_dir/" + ansible-playbook -b -i /usr/bin/tripleo-ansible-inventory \ + $UPGRADE_NODE/$config_dir/upgrade_steps_playbook.yaml --limit $target_host + log "Starting the deploy-steps-playbook run for $target_host from $UPGRADE_NODE/$config_dir/" + ansible-playbook -b -i /usr/bin/tripleo-ansible-inventory \ + $UPGRADE_NODE/$config_dir/deploy_steps_playbook.yaml --limit $target_host fi if [ -n "$QUERY_NODE" ]; then