Skip to content

Commit

Permalink
Merge pull request ClusterLabs#62 from wferi/to-upstream
Browse files Browse the repository at this point in the history
Spelling and init script changes
  • Loading branch information
wenningerk authored Jan 14, 2019
2 parents dbae8ab + c1aa321 commit 2d595fd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
2 changes: 1 addition & 1 deletion man/sbd.8.pod
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ node must be manually "unfenced" by sending an empty message to it:
Set the start-up wait time for devices. (Defaults to I<120>.)

Dynamic block devices such as iSCSI might not be fully initialized and
present yet. This allows to set a timeout for waiting for devices to
present yet. This allows one 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.

Expand Down
4 changes: 2 additions & 2 deletions src/sbd-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,12 +780,12 @@ do_exit(char kind, bool do_flush)
cl_log(LOG_NOTICE, "Initiating kdump");

} else if (debug_mode == 1) {
cl_log(LOG_WARNING, "Initiating kdump instead of panicing the node (debug mode)");
cl_log(LOG_WARNING, "Initiating kdump instead of panicking the node (debug mode)");
kind = 'c';
}

if (debug_mode == 2) {
cl_log(LOG_WARNING, "Shutting down SBD instead of panicing the node (debug mode)");
cl_log(LOG_WARNING, "Shutting down SBD instead of panicking the node (debug mode)");
watchdog_close(true);
exit(0);
}
Expand Down
36 changes: 34 additions & 2 deletions src/sbd.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,30 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
### BEGIN INIT INFO
# Provides: sbd
# Required-Start: $network $remote_fs
# Should-Start: $syslog iscsi multipath-tools corosync
# X-Start-Before: pacemaker
# Required-Stop: $network $remote_fs
# Should-Stop: iscsi multipath-tools corosync
# X-Stop-After: pacemaker
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Shared-storage based fencing daemon
# Description: SBD provides a node fencing mechanism for
# Pacemaker-based clusters through the exchange of
# messages via shared block storage such as for
# example a SAN, iSCSI, FCoE. It can be used as
# a STONITH mechanism in all configurations that
# have reliable shared storage.
### END INIT INFO

SBD_CONFIG=@CONFIGDIR@/sbd
SBD_BIN="/usr/sbin/sbd"

[ -e /lib/lsb/init-functions ] && . /lib/lsb/init-functions

test -x $SBD_BIN || exit 1
test -f $SBD_CONFIG || exit 1

Expand Down Expand Up @@ -84,11 +104,23 @@ stop() {
done
}

status() {
if pidofproc -p $SBD_PIDFILE $SBD_BIN >/dev/null 2>&1 ; then
echo "SBD is running."
return 0
else
echo "SBD is not running."
return 1
fi
}

case "$1" in
start|stop)
start|stop|status)
$1 ;;
restart|force-reload)
stop; start ;;
*)
echo "Usage: $0 (start|stop)"
echo "Usage: $0 (start|stop|status|restart|force-reload)"
exit 1
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion src/sbd.sysconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ SBD_WATCHDOG_DEV=/dev/watchdog
## Type: integer
## Default: 5
#
# How long, in seconds, the watchdog will wait before panicing the
# How long, in seconds, the watchdog will wait before panicking the
# node if no-one tickles it.
#
# This depends mostly on your storage latency; the majority of devices
Expand Down

0 comments on commit 2d595fd

Please sign in to comment.