summaryrefslogtreecommitdiff
path: root/gate
diff options
context:
space:
mode:
authorLucas Alvares Gomes <lucasagomes@gmail.com>2021-02-18 10:56:46 +0000
committerLucas Alvares Gomes <lucasagomes@gmail.com>2021-03-15 09:41:03 +0000
commit20a7c98eff6592c3131360ad9d6eb12367dd11f6 (patch)
treec153f0701d63a43a26999adfa20c34944441d855 /gate
parent8a92bf8115d4ba08028158b0db431111c8e89512 (diff)
downloadnova-20a7c98eff6592c3131360ad9d6eb12367dd11f6.tar.gz
[OVN] Adapt the live-migration job scripts to work with OVN
There's no q-agt service in an OVN deployment. Change-Id: Ia25c966c70542bcd02f5540b5b94896c17e49888 Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Diffstat (limited to 'gate')
-rwxr-xr-xgate/test_evacuate.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/gate/test_evacuate.sh b/gate/test_evacuate.sh
index 2f8d21f64b..19466221da 100755
--- a/gate/test_evacuate.sh
+++ b/gate/test_evacuate.sh
@@ -56,7 +56,11 @@ nova boot --flavor ${flavor_id} --poll \
# Fence the subnode
echo "Stopping n-cpu, q-agt and guest domains on subnode"
-$ANSIBLE subnodes --become -f 5 -i "$WORKSPACE/inventory" -m shell -a "systemctl stop devstack@n-cpu devstack@q-agt"
+_stop_services="devstack@n-cpu"
+if sudo systemctl list-unit-files --type service | grep -q "devstack@q-agt"; then
+ _stop_services+=" devstack@q-agt"
+fi
+$ANSIBLE subnodes --become -f 5 -i "$WORKSPACE/inventory" -m shell -a "systemctl stop $_stop_services"
$ANSIBLE subnodes --become -f 5 -i "$WORKSPACE/inventory" -m shell -a "for domain in \$(virsh list --all --name); do virsh destroy \$domain; done"
echo "Forcing down the subnode so we can evacuate from it"