Dima Kuznetsov has uploaded a new change for review. Change subject: spmprotect: Switch from fencing by pid to fencing using systemctl ......................................................................
spmprotect: Switch from fencing by pid to fencing using systemctl Change-Id: Ifdea618514232a1f751afae54337de787f297b9e Signed-off-by: Dima Kuznetsov <dkuzn...@redhat.com> --- M vdsm/storage/protect/spmprotect.sh.in 1 file changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/43211/1 diff --git a/vdsm/storage/protect/spmprotect.sh.in b/vdsm/storage/protect/spmprotect.sh.in index 101cac0..099e40f 100755 --- a/vdsm/storage/protect/spmprotect.sh.in +++ b/vdsm/storage/protect/spmprotect.sh.in @@ -25,14 +25,13 @@ LOGFILE="/var/log/vdsm/spm-lock.log" VDS_CLIENT="/usr/bin/vdsClient" LEASE_UTIL="@SAFELEASE_PATH@" +SYSTEMCTL="/bin/systemctl" KILL="/bin/kill" PKILL="/usr/bin/pkill" sdUUID=$2 CHECKVDSM=${CHECKVDSM:-"/usr/bin/pgrep vdsm"} REBOOTCMD=${REBOOTCMD:-"sudo /sbin/reboot -f"} RENEWDIR="/var/run/vdsm/spmprotect/$$" -VDSM_PIDFILE="/var/run/vdsm/vdsmd.pid" -VDSM_PID=`/bin/cat "$VDSM_PIDFILE"` function usage() { if [ -n "$1" ]; then @@ -75,13 +74,13 @@ disown (sleep 7 log "Trying to stop vdsm for sdUUID=$sdUUID id=$ID lease_path=$LEASE_FILE" - echodo $KILL "$VDSM_PID" + echodo $SYSTEMCTL kill --signal=15 vdsmd.service sleep 2 - echodo $KILL -9 "$VDSM_PID" + echodo $SYSTEMCTL kill --signal=9 vdsmd.service )& disown - echodo $KILL -USR1 "$VDSM_PID" + echodo $SYSTEMCTL kill --signal=30 vdsmd.service rm -fr $RENEWDIR trap EXIT @@ -206,7 +205,7 @@ dbg="-d" fi -log "Protecting spm lock for vdsm pid $VDSM_PID" +log "Protecting spm lock for vdsmd" case $1 in start) -- To view, visit https://gerrit.ovirt.org/43211 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifdea618514232a1f751afae54337de787f297b9e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dima Kuznetsov <dkuzn...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches