![Marius Cornea](/assets/img/avatar_default.png)
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
15 lines
557 B
Django/Jinja
15 lines
557 B
Django/Jinja
#!/bin/bash
|
|
#
|
|
# Script which validates that the active agent hosting a neutron router
|
|
# has not failed over during upgrade. Used with l3_agent_failover_check.
|
|
|
|
source {{ working_dir }}/router_active_agent.sh
|
|
|
|
ROUTER_HOST_POST=$(neutron l3-agent-list-hosting-router ${ROUTER_ID} -f json | jq -r -c '.[]|select(.ha_state=="active")|.host')
|
|
|
|
if [ "$ROUTER_HOST_PRE" != "$ROUTER_HOST_POST" ]; then
|
|
echo "Neutron router failover detected."
|
|
echo "Router $ROUTER_ID previously hosted by $ROUTER_HOST_PRE and now hosted by $ROUTER_HOST_POST"
|
|
exit 1
|
|
fi
|