diff options
author | Lee Yarwood <lyarwood@redhat.com> | 2020-09-10 18:12:54 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2020-09-15 08:48:06 +0000 |
commit | 9d55b754f29258b8f95f2da4e831b49b3c34e9ff (patch) | |
tree | d15b3c009693f5e542ddb059cd5ba87c78e9667b /gate | |
parent | e0f088c95d05e9cf32d4af4c7cfc20566b17f8e1 (diff) | |
download | nova-9d55b754f29258b8f95f2da4e831b49b3c34e9ff.tar.gz |
test_evacuate: Wait until subnode is down before starting tests
Change-Id: I714eb2ef3a6d307b60d82e7fedc49bfeadd20289
Diffstat (limited to 'gate')
-rwxr-xr-x | gate/test_evacuate.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gate/test_evacuate.sh b/gate/test_evacuate.sh index 3ef1caeabd..4a54988e03 100755 --- a/gate/test_evacuate.sh +++ b/gate/test_evacuate.sh @@ -62,6 +62,19 @@ $ANSIBLE subnodes --become -f 5 -i "$WORKSPACE/inventory" -m shell -a "for domai 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 +count=0 +status=$(openstack compute service list --host ${subnode} --service nova-compute -f value -c State) +while [ "${status}" != "down" ] +do + sleep 1 + count=$((count+1)) + if [ ${count} -eq 30 ]; then + echo "Timed out waiting for subnode compute service to be marked as down" + exit 5 + fi + status=$(openstack compute service list --host ${subnode} --service nova-compute -f value -c State) +done + echo "Stopping libvirt on the localhost before evacuating to trigger failure" sudo systemctl stop libvirt-bin |