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
This commit is contained in:
marios 2017-08-04 15:24:40 +03:00 committed by Marios Andreou
parent cdbed13bb5
commit c61618fd57

View File

@ -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