Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (24 sloc) 0.612 kb
#!/bin/bash
# Call the SM backend python program to reset the locks on all the VDIs that were on the
# host that has been declared dead
HOSTUUID=$2
REASON=$4
function reset {
echo Resetting VDIs on host $HOSTUUID
IFS=","
for i in `xe pbd-list host-uuid=$HOSTUUID --minimal`
do
SR=`xe pbd-param-get uuid=$i param-name=sr-uuid`
"@OPTDIR@/sm/resetvdis.py" $HOSTUUID $SR
done
}
# Only reset the VDIs if the host is actually fenced, or the user has requested it.
if [ $REASON = "fenced" ]; then
reset
fi
if [ $REASON = "user" ]; then
reset
fi
if [ $REASON = "dbdestroy" ]; then
reset
fi
Jump to Line
Something went wrong with that request. Please try again.