diff --git a/man/sbd.8.pod b/man/sbd.8.pod index fd1efad..40b1f4f 100644 --- a/man/sbd.8.pod +++ b/man/sbd.8.pod @@ -289,6 +289,13 @@ present yet. This allows to set a timeout for waiting for devices to appear on start-up. If set to 0, start-up will be aborted immediately if no devices are available. +=item B<-A> + +If enabled, sbd will delay on boot for "msgwait" seconds. +This may be necessary if your cluster nodes reboot so fast that the +other nodes are still waiting in the fence acknowledgement phase. +This is an occasional issue with virtual machines. + =item B<-Z> Enable trace mode. B # of failures before a servant is considered faulty (optional)\n" " (default is 1, set to 0 to disable)\n" +"-A Enable start delay (wait for msgwait seconds at start) (optional)\n" "-P Check Pacemaker quorum and node health (optional, watch only)\n" "-Z Enable trace mode. WARNING: UNSAFE FOR PRODUCTION!\n" "Commands:\n" diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c index 3206973..ba91eba 100644 --- a/src/sbd-inquisitor.c +++ b/src/sbd-inquisitor.c @@ -877,10 +877,13 @@ int main(int argc, char **argv, char **envp) } cl_log(LOG_DEBUG, "Start delay: %d (%s)", (int)start_delay, value?value:"default"); - while ((c = getopt(argc, argv, "czC:DPRTWZhvw:d:n:p:1:2:3:4:5:t:I:F:S:s:")) != -1) { + while ((c = getopt(argc, argv, "czC:DPRTAWZhvw:d:n:p:1:2:3:4:5:t:I:F:S:s:")) != -1) { switch (c) { case 'D': break; + case 'A': + start_delay = 1; + break; case 'Z': debug_mode++; cl_log(LOG_INFO, "Debug mode now at level %d", (int)debug_mode); diff --git a/src/sbd.sh b/src/sbd.sh index 91f49a3..3911f5d 100644 --- a/src/sbd.sh +++ b/src/sbd.sh @@ -59,6 +59,9 @@ always) SBD_OPTS+=" -S 0" ;; clean) SBD_OPTS+=" -S 1" ;; esac : ${SBD_DELAY_START:="no"} +if ocf_is_true "$SBD_DELAY_START" ; then + SBD_OPTS+=" -A" +fi start() { if ! pidofproc -p $SBD_PIDFILE $SBD_BIN >/dev/null 2>&1 ; then @@ -66,9 +69,6 @@ start() { echo "SBD failed to start; aborting." exit 1 fi - if ocf_is_true ${SBD_DELAY_START} ; then - sleep $(sbd -d "$SBD_DEVICE" dump | grep -m 1 msgwait | awk '{print $4}') 2>/dev/null - fi else return 0 fi