+ PATH=/bin:/sbin:/usr/bin:/usr/sbin + export PATH ++ dirname /usr/share/cluster/vm.sh + . /usr/share/cluster/ocf-shellfuncs +++ basename /usr/share/cluster/vm.sh ++ __SCRIPT_NAME=vm.sh ++ consoletype ++ '[' 1 -eq 1 ']' ++ __SERIAL=yes ++ __LOG_PID=24420 ++++ readlink /proc/24420/exe +++ basename /usr/sbin/clurgmgrd ++ __LOG_NAME=clurgmgrd ++ __ocf_set_defaults stop ++ __OCF_ACTION=stop ++ unset LANG ++ LC_ALL=C ++ export LC_ALL ++ OCF_SUCCESS=0 ++ OCF_ERR_GENERIC=1 ++ OCF_ERR_ARGS=2 ++ OCF_ERR_UNIMPLEMENTED=3 ++ OCF_ERR_PERM=4 ++ OCF_ERR_INSTALLED=5 ++ OCF_ERR_CONFIGURED=6 ++ OCF_NOT_RUNNING=7 ++ '[' -z vm ']' ++ '[' -z 1 ']' ++ '[' -z /usr/share/cluster ']' ++ '[' '!' -d /usr/share/cluster ']' ++ '[' x1 '!=' x1 ']' ++ '[' -z 0 ']' ++ '[' xstop = xmeta-data ']' ++ '[' -z vm:guest1 ']' + export OCF_APP_ERR_INDETERMINATE=150 + OCF_APP_ERR_INDETERMINATE=150 + case $1 in + validate_all ++ id -u + '[' 0 = 0 ']' + '[' -z auto ']' + '[' auto = auto ']' ++ virsh version ++ grep 'Running hypervisor:' ++ awk '{print $3}' ++ tr A-Z a-z + export OCF_RESKEY_hypervisor=xen + OCF_RESKEY_hypervisor=xen + '[' -z xen ']' + echo Hypervisor: xen Hypervisor: xen + '[' 1 = 0 ']' + '[' -z '' ']' + echo 'Management tool: virsh' Management tool: virsh + export OCF_RESKEY_use_virsh=1 + OCF_RESKEY_use_virsh=1 + '[' -z auto -o auto = auto ']' + '[' 1 = 1 ']' + '[' xen = qemu ']' + '[' xen = xen ']' + OCF_RESKEY_hypervisor_uri=xen:/// + echo Hypervisor URI: xen:/// Hypervisor URI: xen:/// + '[' -z auto -o auto = auto ']' + '[' 1 = 1 ']' + '[' xen = qemu ']' + '[' xen = xen ']' + export OCF_RESKEY_migration_uri=xenmigr://%s/ + OCF_RESKEY_migration_uri=xenmigr://%s/ + '[' -n xenmigr://%s/ ']' ++ printf xenmigr://%s/ target_host + echo Migration URI format: xenmigr://target_host/ Migration URI format: xenmigr://target_host/ + '[' -z guest1 ']' + return 0 + do_stop shutdown destroy + declare domstate rv ++ do_status ++ '[' 1 = 1 ']' ++ virsh_status ++ declare state pid ++ '[' xen = xen ']' ++ service xend status ++ '[' 0 -ne 0 ']' +++ pidof libvirtd ++ pid=4013 ++ '[' -z 4013 ']' +++ virsh domstate guest1 ++ state=blocked ++ echo blocked ++ '[' blocked = running ']' ++ '[' blocked = paused ']' ++ '[' blocked = 'no state' ']' ++ '[' blocked = idle ']' ++ return 1 ++ return 1 + domstate=blocked + rv=1 + ocf_log debug 'Virtual machine guest1 is blocked' + '[' 2 -lt 2 ']' + declare __OCF_PRIO=debug + declare -i __OCF_PRIO_N + shift + declare '__OCF_MSG=Virtual machine guest1 is blocked' + case "${__OCF_PRIO}" in + __OCF_PRIO_N=7 + pretty_echo debug 'Virtual machine guest1 is blocked' + declare pretty + declare 'n=' + declare __OCF_PRIO=debug + shift + declare '__OCF_MSG=Virtual machine guest1 is blocked' + '[' -n yes ']' + echo ' Virtual machine guest1 is blocked' Virtual machine guest1 is blocked + return 0 ++ which clulog + '[' -z /usr/sbin/clulog ']' + clulog -p 24420 -n clurgmgrd -s 7 'Virtual machine guest1 is blocked' + '[' 1 -eq 150 ']' + '[' 1 = 1 ']' + do_virsh_stop shutdown destroy + declare -i timeout=60 + declare -i ret=1 + declare state ++ do_status ++ '[' 1 = 1 ']' ++ virsh_status ++ declare state pid ++ '[' xen = xen ']' ++ service xend status ++ '[' 0 -ne 0 ']' +++ pidof libvirtd ++ pid=4013 ++ '[' -z 4013 ']' +++ virsh domstate guest1 ++ state=blocked ++ echo blocked ++ '[' blocked = running ']' ++ '[' blocked = paused ']' ++ '[' blocked = 'no state' ']' ++ '[' blocked = idle ']' ++ return 1 ++ return 1 + state=blocked + '[' 1 -eq 0 ']' + return 0 + return 0 + exit 0