mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 11:22:55 +09:00
Retry kvm cancel to make sure the VM is destroyed
(cherry picked from commit 57ac26590a)
This commit is contained in:
1 parent
4c298351d7
commit
96b2a8a342
1 file changed
+16
-2
@@ -21,5 +21,19 @@ source $(dirname $0)/../../scripts_common.sh
|
||||
|
||||
deploy_id=$1
|
||||
|
||||
exec_and_log "virsh --connect $LIBVIRT_URI destroy $deploy_id" \
|
||||
"Could not destroy $deploy_id"
|
||||
TIMEOUT=60
|
||||
|
||||
function destroy_and_monitor
|
||||
{
|
||||
virsh --connect $LIBVIRT_URI destroy $deploy_id
|
||||
|
||||
virsh --connect $LIBVIRT_URI --readonly dominfo $deploy_id
|
||||
[ "x$?" != "x0" ]
|
||||
}
|
||||
|
||||
retry $TIMEOUT destroy_and_monitor
|
||||
|
||||
if [ "x$?" != "x0" ]; then
|
||||
error_message "Could not destroy $deploy_id"
|
||||
exit 1
|
||||
fi
|
||||
Reference in new issue
Block a user