diff options
author | dongwenjuan <dong.wenjuan@zte.com.cn> | 2016-06-16 17:30:41 +0800 |
---|---|---|
committer | dongwenjuan <dong.wenjuan@zte.com.cn> | 2016-06-17 08:38:23 +0800 |
commit | 1b42fe2306b18996f53e5d987d7c5d106a7325f3 (patch) | |
tree | 7a06e512473b813d5f6821754df4cb4739c6ebf7 /tests/run.sh | |
parent | 0a0d77039d4d2ece184461b78e65a7c6737d4b5a (diff) |
Before deleting the instance, check if the instance exists
The instance may not exist if there is a error before creating
instance or it failed to create, run the `cleanup` to delete the
non-existent instance will raise an error
Change-Id: I13e4b63be952967605093a4427f5b0ac4be280c3
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-x | tests/run.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run.sh b/tests/run.sh index 241d6898..a2656aae 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -226,7 +226,7 @@ cleanup() { python ./nova_force_down.py "$COMPUTE_HOST" --unset sleep 1 - nova delete "$VM_NAME" + nova list | grep -q " $VM_NAME " && nova delete "$VM_NAME" sleep 1 alarm_id=$(ceilometer alarm-list | grep " $ALARM_NAME " | awk '{print $2}') sleep 1 |