/etc/xcp/hook-scripts/host-post-declare-dead/10resetvdis is in xcp-xapi 1.3.2-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #!/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
# Only reset the VDIs if the host is actually fenced!
if [ ! $REASON = "fenced" ]; then
exit 0
fi
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`
"/usr/lib/xcp/sm/resetvdis.py" $HOSTUUID $SR
done
|