From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26473 invoked by alias); 27 Feb 2009 16:21:35 -0000 Received: (qmail 26467 invoked by alias); 27 Feb 2009 16:21:35 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: cluster: master - init.d/cman: unfence local node To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 7e9d9b28e9b0d45c1786b7b39fdd4f7351a212be X-Git-Newrev: 5ff28e4a8eb1857e0d708f2dbd805a3fc4197512 From: David Teigland Message-Id: <20090227162113.E3BB4120154@lists.fedorahosted.org> Date: Fri, 27 Feb 2009 16:21:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00628.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5ff28e4a8eb1857e0d708f2dbd805a3fc4197512 Commit: 5ff28e4a8eb1857e0d708f2dbd805a3fc4197512 Parent: 7e9d9b28e9b0d45c1786b7b39fdd4f7351a212be Author: David Teigland AuthorDate: Thu Feb 26 15:15:49 2009 -0600 Committer: David Teigland CommitterDate: Fri Feb 27 10:18:17 2009 -0600 init.d/cman: unfence local node Run fence_node -U after cman_tool join. This does nothing unless unfencing is defined for the local node. If unfencing is defined and the unfencing fails, it causes init.d/cman to fail. Signed-off-by: David Teigland --- cman/init.d/cman.in | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/cman/init.d/cman.in b/cman/init.d/cman.in index 9114adc..3aa214a 100644 --- a/cman/init.d/cman.in +++ b/cman/init.d/cman.in @@ -204,6 +204,25 @@ start_cman() return 0 } +unfence_self() +{ + fence_node -U > /dev/null 2>&1 + error=$? + + if [ $error -eq 0 ] + then + echo " Unfencing self... done" + return 0 + else + if [ $error -eq 1 ] + then + echo " Unfencing self... failed" + return 1 + else + return 0 + fi + fi +} start_qdiskd() { @@ -466,6 +485,12 @@ start() return 1 fi + unfence_self + if [ $? -eq 1 ] + then + return 1 + fi + start_qdiskd echo -n " Starting daemons... "