[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/rgmanager ChangeLog src/resources/clus ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	lhh sourceware org	2007-09-25 13:23:47

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/resources: clusterfs.sh 

Log message:
	Resolve #252241 - add self_fence support to clusterfs

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.29&r2=1.5.2.30
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.13&r2=1.1.2.14

--- cluster/rgmanager/ChangeLog	2007/07/31 18:26:39	1.5.2.29
+++ cluster/rgmanager/ChangeLog	2007/09/25 13:23:47	1.5.2.30
@@ -1,3 +1,6 @@
+2007-10-25 Lon Hohberger <lhh at redhat.com>:
+	* src/resources/clusterfs.sh: Make self_fence work. #252241
+
 2007-07-31 Lon Hohberger <lhh at redhat.com>
 	* src/daemons/groups.c, rg_thread.c: Fix #246669 - status check unbounded
 	but should be 1
--- cluster/rgmanager/src/resources/clusterfs.sh	2007/05/21 15:56:47	1.1.2.13
+++ cluster/rgmanager/src/resources/clusterfs.sh	2007/09/25 13:23:47	1.1.2.14
@@ -133,6 +133,18 @@
 	    <content type="string"/>
         </parameter>
 
+	<parameter name="self_fence">
+	    <longdesc lang="en">
+	        If set and unmounting the file system fails, the node will
+		immediately reboot.  Generally, this is used in conjunction
+		with force-unmount support, but it is not required.
+	    </longdesc>
+	    <shortdesc lang="en">
+	        Seppuku Unmount
+	    </shortdesc>
+	    <content type="boolean"/>
+	</parameter>
+
 	<parameter name="fsid">
 	    <longdesc lang="en">
 	    	File system ID for NFS exports.  This can be overridden
@@ -795,6 +807,15 @@
 		esac
 	fi
 
+	if [ -n "$mp" ]; then
+		case ${OCF_RESKEY_self_fence} in
+	        $YES_STR)	self_fence=$YES ;;
+		1)		self_fence=$YES ;;
+	        *)		self_fence="" ;;
+		esac
+	fi
+
+
 	#
 	# Always do this hackery on clustered file systems.
 	#
@@ -870,8 +891,13 @@
 	done # while 
 
 	if [ -n "$umount_failed" ]; then
-		ocf_log err "'umount $dev' failed ($mp), error=$ret_val"
+		ocf_log err "'umount $mp' failed, error=$ret_val"
 
+		if [ "$self_fence" ]; then
+			ocf_log alert "umount failed - REBOOTING"
+			sync
+			reboot -fn
+		fi
 		return $FAIL
 	fi
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]