tripleo-upgrade/templates/l3_agent_failover_pre.sh.j2
Marius Cornea 71aaf58e6f Add Neutron L3 agent failover check during upgrade
This change adds suppport for validating that a router created on
the overcloud before upgrade remains active on the same node between
the various steps of the upgrade process and does not failover.

Change-Id: I1273367fb07bda5cdacb538081a87f9d3e5ece3c
2018-04-12 17:48:15 +00:00

8 lines
442 B
Django/Jinja

#!/bin/bash
#
# Script which checks the active agent hosting a neutron router
FIRST_ROUTER=$(openstack router list -f json | jq -r -c '[.[]|select(.State=="UP")][0].ID')
echo export ROUTER_ID="${FIRST_ROUTER}" > {{ working_dir }}/router_active_agent.sh
echo export ROUTER_HOST_PRE=$(neutron l3-agent-list-hosting-router ${FIRST_ROUTER} -f json | jq -r -c '.[]|select(.ha_state=="active")|.host') >> {{ working_dir }}/router_active_agent.sh