Skip to contentSkip to conversation

cluster/rgmanager ChangeLog src/daemons/fo_dom ...

Cluster-devel [email protected] 1 participant 1 message Jun 16, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2006-06-16 19:57:52

Modified files:
rgmanager : ChangeLog
rgmanager/src/daemons: fo_domain.c groups.c rg_state.c rgmanager/src/resources: clusterfs.sh fs.sh nfsclient.sh
nfsexport.sh svclib_nfslock

Log message:
Work around #193128, clean up NFS bits

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.17&r2=1.5.2.18
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/fo_domain.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.3&r2=1.5.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/groups.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.8.2.16&r2=1.8.2.17
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_state.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.13&r2=1.4.2.14
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.8&r2=1.1.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.13&r2=1.4.2.14
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/nfsclient.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.3.2.7&r2=1.3.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/nfsexport.sh.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.4.2.4&r2=1.4.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/svclib_nfslock.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.1.2.1&r2=1.1.2.2

rgmanager/ChangeLog +7 -0
@@ -1,3 +1,10 @@
+2006-06-16 Lon Hohberger <[email protected]>
+	* src/daemons/fo_domain.c, groups.c: Get rid of compiler warnings
+	* src/daemons/rg_state.c: Change clu_lock_verbose to use the NULL
+	lock/convert mechanism offered by DLM to work around #193128
+	* src/resources/fs.sh, clusterfs.sh, nfsexport.sh, nfsclient.sh,
+	service.sh, svclib_nfslock: Finish up initial NFS workaround.
+
 2006-05-23 Lon Hohberger <[email protected]>
 	* src/daemons/members.c: Zap pad fields on copy-out
 	* src/daemons/main.c: Give notice if skipping an event because of
rgmanager/src/daemons/fo_domain.c +2 -0
@@ -332,8 +332,10 @@
 	fod_t *fod = NULL;
 	int found = 0;
 	int owned_by_node = 0, started = 0, no_owner = 0;
+#ifndef NO_CCS
 	rg_state_t svc_state;
 	void *lockp;
+#endif
 
 	ENTER();
 
rgmanager/src/daemons/groups.c +0 -2
@@ -757,7 +757,6 @@
 	resource_node_t *curr;
 	char *name;
 	rg_state_t svcblk;
-	void *lockp;
 
 	pthread_rwlock_rdlock(&resource_lock);
 	list_do(&_tree, curr) {
@@ -814,7 +813,6 @@
 	char *name;
 	rg_state_t svcblk;
 	int need_kill;
-	void *lockp;
 
 	clulog(LOG_INFO, "Stopping changed resources.\n");
 
rgmanager/src/daemons/rg_state.c +49 -2

76 lines not on this page · raw message

rgmanager/src/resources/clusterfs.sh +4 -4
@@ -803,10 +803,10 @@
 		ocf_log warning "Dropping node-wide NFS locks"
 		mkdir -p $mp/.clumanager/statd
 		# Copy out the notify list; our 
-		# IPs are already torn down
-		if notify_list_store $mp/.clumanager/statd; then
-			notify_list_broadcast $mp/.clumanager/statd
-		fi
+			# IPs are already torn down
+			if notify_list_store $mp/.clumanager/statd; then
+				notify_list_broadcast $mp/.clumanager/statd
+			fi
 	fi
 
 	# Always invalidate buffers on clusterfs resources
rgmanager/src/resources/fs.sh +1 -0
@@ -1153,6 +1153,7 @@
 				     [ "$OCF_RESKEY_nfslock" = "1" ]; then
 				    ocf_log warning \
 					"Dropping node-wide NFS locks"
+				    pkill -KILL -x lockd
 	          		    mkdir -p $mp/.clumanager/statd
 				    # Copy out the notify list; our 
 				    # IPs are already torn down
rgmanager/src/resources/nfsclient.sh +20 -0
@@ -95,6 +95,18 @@
             <content type="string"/>
         </parameter>
 
+        <parameter name="nfslock" inherit="nfsexport%nfslock">
+            <longdesc lang="en">
+	    	This tells us whether the service in question has the
+		NFS lock workarounds enabled.  If so, we always unexport
+		* rather than the specified client.
+            </longdesc>
+            <shortdesc lang="en">
+	    	NFS Lock workaround flag
+            </shortdesc>
+            <content type="boolean"/>
+        </parameter>
+
         <parameter name="options">
             <longdesc lang="en">Defines a list of options for this
                 particular client.  See 'man 5 exports' for a list
@@ -295,6 +307,14 @@
 stop)
 	verify_all || exit $OCF_ERR_ARGS
 
+	if [ "$OCF_RESKEY_nfslock" = "1" ]; then
+		#
+		# If the NFS lock workarounds were enabled, unexport from
+		# the world
+		#
+		export OCF_RESKEY_target="*"
+	fi
+
 	ocf_log info "Removing export: ${OCF_RESKEY_target}:${OCF_RESKEY_path}"
 	exportfs -u "${OCF_RESKEY_target}:${OCF_RESKEY_path}"
 	rv=$?
rgmanager/src/resources/nfsexport.sh +13 -0
@@ -97,6 +97,19 @@
             </shortdesc>
 	    <content type="string"/>
         </parameter>
+
+        <parameter name="nfslock" inherit="nfslock">
+            <longdesc lang="en">
+                If you can see this, your GUI is broken.
+		This inherits an unspecified nfslock parameter so that
+		it works with fs or clusterfs resources.
+            </longdesc>
+            <shortdesc lang="en">
+                If you can see this, your GUI is broken.
+            </shortdesc>
+	    <content type="boolean"/>
+        </parameter>
+
     </parameters>
 
     <actions>
rgmanager/src/resources/svclib_nfslock +0 -11
@@ -163,17 +163,6 @@
 	declare lockd_pid=$(pidof lockd)
 	declare nl_dir=$1
 
-	# First of all, send lockd a SIGKILL.  We hope nfsd is running.
-	# If it is, this will cause lockd to reset the grace period for
-	# lock reclaiming.
-	if [ -n "$lockd_pid" ]; then
-		ocf_log info "Asking lockd to drop locks (pid $lockd_pid)"
-		kill -9 $lockd_pid
-	else
-		ocf_log warning "lockd not running; cannot notify clients"
-		return 1
-	fi
-	
         while read dev family addr maskbits; do
 		if [ "$family" != "inet" ]; then
 			continue