diff options
author | Lee Yarwood <lyarwood@redhat.com> | 2020-03-18 15:17:27 +0000 |
---|---|---|
committer | Lee Yarwood <lyarwood@redhat.com> | 2020-03-19 11:34:13 +0000 |
commit | b097959c1cbc9af1d90c7502286bc3e20972201f (patch) | |
tree | 766272744530437face65fbb98f1ac739da1bf50 /gate | |
parent | d83bc6fed0d38d0382d35bfb3799abe7f74090a9 (diff) | |
download | nova-b097959c1cbc9af1d90c7502286bc3e20972201f.tar.gz |
nova-live-migration: Ensure subnode is fenced during evacuation testing
As stated in the forced-down API [1]:
> Setting a service forced down without completely fencing it will
> likely result in the corruption of VMs on that host.
Previously only the libvirtd service was stopped on the subnode prior to
calling this API, allowing n-cpu, q-agt and the underlying guest domains
to continue running on the host.
This change now ensures all devstack services are stopped on the subnode
and all active domains destroyed.
It is hoped that this will resolve bug #1813789 where evacuations have
timed out due to VIF plugging issues on the new destination host.
[1] https://docs.openstack.org/api-ref/compute/?expanded=update-forced-down-detail#update-forced-down
Related-Bug: #1813789
Change-Id: I8af2ad741ca08c3d88efb9aa817c4d1470491a23
Diffstat (limited to 'gate')
-rwxr-xr-x | gate/test_evacuate.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gate/test_evacuate.sh b/gate/test_evacuate.sh index 1dfbc8a12c..19c339342a 100755 --- a/gate/test_evacuate.sh +++ b/gate/test_evacuate.sh @@ -54,6 +54,11 @@ nova boot --flavor ${flavor_id} --poll \ --block-device id=${image_id},source=image,dest=volume,size=1,bootindex=0,shutdown=remove \ --nic net-id=${network_id} --availability-zone nova:${subnode} evacuate-bfv-test +# Fence the subnode +echo "Stopping all services and guest domains on subnode" +$ANSIBLE subnodes --become -f 5 -i "$WORKSPACE/inventory" -m shell -a "systemctl stop devstack@*" +$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" openstack --os-compute-api-version 2.11 compute service set --down ${subnode} nova-compute |