1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Issue another shutdown to cover occasional libvirt lack of attention

(cherry picked from commit f63e6bb3f29005182b697806771a85f4a9ad81fa)
This commit is contained in:
Tino Vazquez 2012-04-09 13:55:33 +02:00
parent 2010fb680c
commit 1835d0f1f1

View File

@ -25,6 +25,7 @@ source $(dirname $0)/../../scripts_common.sh
#------------------------------------------------------------------------------
POLL_INTERVAL=2
TIMEOUT=300
HALF_LOOP=$(($TIMEOUT/POLL_INTERVAL))
deploy_id=$1
@ -47,6 +48,13 @@ do
echo "Timeout reached" >&2
exit 1
fi
# Issue another shutdown to cover occasional libvirt lack of attention
if [ "$count" -eq "$HALF_LOOP" ]
then
virsh --connect $LIBVIRT_URI shutdown $deploy_id
fi
let count=count+$POLL_INTERVAL
done