From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio M. Di Nitto Date: Tue, 9 Oct 2012 11:36:04 +0200 Subject: [Cluster-devel] [PATCH 1/2] cman init: make sure we start after fence_sanlockd and warn users Message-ID: <1349775365-31526-1-git-send-email-fdinitto@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: "Fabio M. Di Nitto" Resolves: rhbz#509056 Signed-off-by: Fabio M. Di Nitto --- cman/init.d/cman.in | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in index a88f52f..849739b 100644 --- a/cman/init.d/cman.in +++ b/cman/init.d/cman.in @@ -8,8 +8,8 @@ # ### BEGIN INIT INFO # Provides: cman -# Required-Start: $network $time -# Required-Stop: $network $time +# Required-Start: $network $time fence_sanlockd +# Required-Stop: $network $time fence_sanlockd # Default-Start: # Default-Stop: # Short-Description: Starts and stops cman @@ -740,6 +740,13 @@ stop_cmannotifyd() stop_daemon cmannotifyd } +fence_sanlock_check() +{ + service fence_sanlockd status > /dev/null 2>&1 && + echo " fence_sanlockd detected. Unfencing might take several minutes!" + return 0 +} + unfence_self() { # fence_node returns 0 on success, 1 on failure, 2 if unconfigured @@ -881,6 +888,8 @@ start() [ "$breakpoint" = "daemons" ] && exit 0 + fence_sanlock_check + runwrap unfence_self \ none \ "Unfencing self" -- 1.7.7.6