diff --git a/src/sbd.service.in b/src/sbd.service.in index a558a67..eec688d 100644 --- a/src/sbd.service.in +++ b/src/sbd.service.in @@ -1,28 +1,33 @@ [Unit] Description=Shared-storage based fencing daemon Documentation=man:sbd(8) Before=pacemaker.service Before=dlm.service After=systemd-modules-load.service iscsi.service PartOf=corosync.service RefuseManualStop=true RefuseManualStart=true [Service] -Type=forking -PIDFile=@runstatedir@/sbd.pid +Type=simple +# sbd-inquisitor will usually have opened a watchdog-device +# thus we should give it a chance to do what +# it needs to (anyway kills the subprocesses the +# hard way) and close that gracefully. +# If that isn't successful within time let mixed +# do a cleanup although that will most likely lead to suicide. +KillMode=mixed EnvironmentFile=-@CONFIGDIR@/sbd -ExecStart=@sbindir@/sbd $SBD_OPTS -p @runstatedir@/sbd.pid watch -ExecStop=@bindir@/kill -TERM $MAINPID +ExecStart=@sbindir@/sbd $SBD_OPTS watch # Could this benefit from exit codes for restart? # Does this need to be set to msgwait * 1.2? # TimeoutSec= # If SBD crashes, it'll very likely suicide immediately due to the # hardware watchdog. But one can always try. Restart=on-abort [Install] RequiredBy=corosync.service RequiredBy=pacemaker.service RequiredBy=dlm.service diff --git a/src/sbd_remote.service.in b/src/sbd_remote.service.in index 56675b1..5c08784 100644 --- a/src/sbd_remote.service.in +++ b/src/sbd_remote.service.in @@ -1,25 +1,30 @@ [Unit] Description=Shared-storage based fencing daemon on pacemaker remote node Documentation=man:sbd(8) After=systemd-modules-load.service iscsi.service PartOf=pacemaker_remote.service RefuseManualStop=true RefuseManualStart=true [Service] -Type=forking -PIDFile=@runstatedir@/sbd.pid +Type=simple +# sbd-inquisitor will usually have opened a watchdog-device +# thus we should give it a chance to do what +# it needs to (anyway kills the subprocesses the +# hard way) and close that gracefully. +# If that isn't successful within time let mixed +# do a cleanup although that will most likely lead to suicide. +KillMode=mixed EnvironmentFile=-@CONFIGDIR@/sbd -ExecStart=@sbindir@/sbd $SBD_OPTS -p @runstatedir@/sbd.pid watch -ExecStop=@bindir@/kill -TERM $MAINPID +ExecStart=@sbindir@/sbd $SBD_OPTS watch # Could this benefit from exit codes for restart? # Does this need to be set to msgwait * 1.2? # TimeoutSec= # If SBD crashes, it'll very likely suicide immediately due to the # hardware watchdog. But one can always try. Restart=on-abort [Install] RequiredBy=pacemaker_remote.service RequiredBy=dlm.service