public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-21-gd0aecbf
@ 2008-04-01 21:01 jbrassow
  0 siblings, 0 replies; only message in thread
From: jbrassow @ 2008-04-01 21:01 UTC (permalink / raw)
  To: cluster-cvs, cluster-devel

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=d0aecbf552f27bb2bf9d3c66015dd4d8df559dd8

The branch, RHEL4 has been updated
       via  d0aecbf552f27bb2bf9d3c66015dd4d8df559dd8 (commit)
      from  2114f9e99321008beef4cc18bcbe4aa8712015f9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d0aecbf552f27bb2bf9d3c66015dd4d8df559dd8
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Tue Apr 1 15:24:50 2008 -0500

    rgmanager/lvm.sh:  Fix bug bz242798
    
    Allow a machine to fence itself in the event that it
    cannot deactivate logical volumes.  (The user must
    explicitly enable this option.)  This is useful in cases
    where one machine in the cluster looses connectivity to
    its resources, but the others don't.  The machine fences
    itself and the service moves to another machine.

-----------------------------------------------------------------------

Summary of changes:
 rgmanager/src/resources/lvm.metadata |   13 ++++++++++++-
 rgmanager/src/resources/lvm.sh       |   15 +++++++++++++++
 2 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/lvm.metadata b/rgmanager/src/resources/lvm.metadata
index 03a5655..61a740b 100755
--- a/rgmanager/src/resources/lvm.metadata
+++ b/rgmanager/src/resources/lvm.metadata
@@ -39,7 +39,18 @@
                 If you can see this, your GUI is broken.
             </shortdesc>
 	    <content type="string"/>
-        </parameter>
+	</parameter>
+
+	<parameter name="self_fence">
+            <longdesc lang="en">
+                If set and the clean up of the tags fails, the node will
+                immediately reboot.
+            </longdesc>
+            	<shortdesc lang="en">
+                Fence the node if it is not able to clean up LVM tags
+            </shortdesc>
+            <content type="boolean"/>
+	</parameter>
 
 	<parameter name="nfslock" inherit="service%nfslock">
 	    <longdesc lang="en">
diff --git a/rgmanager/src/resources/lvm.sh b/rgmanager/src/resources/lvm.sh
index 6cfb19a..f45e50d 100755
--- a/rgmanager/src/resources/lvm.sh
+++ b/rgmanager/src/resources/lvm.sh
@@ -293,6 +293,13 @@ lv_activate_and_tag()
 	declare action=$1
 	declare tag=$2
 	declare lv_path=$3
+	typeset self_fence=""
+
+	case ${OCF_RESKEY_self_fence} in
+		"yes")          self_fence=1 ;;
+		1)              self_fence=1 ;;
+		*)              self_fence="" ;;
+	esac
 
 	if [ -z $action ] || [ -z $tag ] || [ -z $lv_path ]; then
 		ocf_log err "Supplied args: 1) $action, 2) $tag, 3) $lv_path"
@@ -314,6 +321,14 @@ lv_activate_and_tag()
 	else
 		ocf_log notice "Deactivating $lv_path"
 		if ! lv_activate_resilient $action $lv_path; then
+			if [ "$self_fence" ]; then
+				ocf_log err "Unable to deactivate $lv_path REBOOT"
+				sync
+				reboot -fn
+			else
+				ocf_log err "Unable to deactivate $lv_path"
+			fi
+
 			ocf_log err "Unable to deactivate $lv_path"
 			return $OCF_ERR_GENERIC
 		fi


hooks/post-receive
--
Cluster Project


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-01 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-01 21:01 Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-21-gd0aecbf jbrassow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).