Skip to contentSkip to conversation

cluster/rgmanager ChangeLog README include/lis ...

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: STABLE
Changes by: lhh at sourceware.org 2006-06-16 20:07:47

Modified files:
rgmanager : ChangeLog README
rgmanager/include: list.h resgroup.h rg_locks.h rgmanager/init.d: rgmanager
rgmanager/man : clusvcadm.8 rgmanager/src/clulib: clulog.c msgsimple.c vft.c rgmanager/src/daemons: Makefile fo_domain.c groups.c main.c
restree.c rg_locks.c rg_state.c rg_thread.c
rgmanager/src/resources: Makefile clusterfs.sh fs.sh ip.sh
nfsclient.sh nfsexport.sh ocf-shellfuncs service.sh
rgmanager/src/utils: Makefile clustat.c clusvcadm.c
Added files:
rgmanager/src/daemons: nodeevent.c watchdog.c rgmanager/src/resources: svclib_nfslock

Log message:
Merge from RHEL4 branch

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.5.2.13&r2=1.5.2.13.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/README.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2&r2=1.2.8.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/list.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1&r2=1.2.2.1.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/resgroup.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.5.6.1&r2=1.3.2.5.6.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/rg_locks.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1&r2=1.1.8.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/init.d/rgmanager.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.1&r2=1.3.2.1.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/man/clusvcadm.8.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.1&r2=1.1.2.1.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/clulog.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1.6.1&r2=1.2.2.1.6.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/msgsimple.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4&r2=1.4.8.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/vft.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.7.2.3.6.2&r2=1.7.2.3.6.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/nodeevent.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/watchdog.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/Makefile.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.6.2.2.6.1&r2=1.6.2.2.6.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/fo_domain.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.5.2.2&r2=1.5.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/groups.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.8.2.10.6.3&r2=1.8.2.10.6.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/main.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.9.2.8.6.6&r2=1.9.2.8.6.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/restree.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.10.2.2.6.5&r2=1.10.2.2.6.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_locks.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.2&r2=1.4.2.2.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_state.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.8.6.3&r2=1.4.2.8.6.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_thread.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.7.2.3.6.2&r2=1.7.2.3.6.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/svclib_nfslock.diff?cvsroot=cluster&only_with_tag=STABLE&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/Makefile.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.3.6.2&r2=1.4.2.3.6.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/clusterfs.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.3.4.4&r2=1.1.2.3.4.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/fs.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.6.4.4&r2=1.4.2.6.4.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/ip.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.5.2.4.4.9&r2=1.5.2.4.4.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/nfsclient.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.2.6.4&r2=1.3.2.2.6.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/nfsexport.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.1.6.3&r2=1.4.2.1.6.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/ocf-shellfuncs.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/service.sh.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.1.2.1.6.2&r2=1.1.2.1.6.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/Makefile.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.1.6.2&r2=1.3.2.1.6.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/clustat.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.5.2.3.6.7&r2=1.5.2.3.6.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/clusvcadm.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.3.6.3&r2=1.2.2.3.6.4

rgmanager/ChangeLog +84 -0
@@ -1,3 +1,87 @@
+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
+	locked services.  Call the self-watchdog init function
+	* src/daemons/watchdog.c: Add Stanko Kupcevic's self-watchdog from
+	CVS head (fixes #193247)
+	* src/daemons/groups.c: Add debug messages.  Actually count
+	resgroups during node transition handling
+	* src/daemons/rg_state.c: allow failover of stopping services if
+	the owner died (#193255)
+	* src/utils/clustat.c: fix typo, misc. usability problems (#192999)
+
+2006-05-16 Lon Hohberger <[email protected]>
+	* src/resources/nfsclient.sh: Fix 189218 - nfsclient not matching
+	wildcards correctly when checking status.  Allow disabling of
+	recovery for services where the nfs clients are ordered (this will
+	cause a full service restart, but works)
+	* src/resources/clusterfs.sh, fs.sh, svclib_nfslock, service.sh:
+	Implement rudimentary atomic bomb-style NFS lock reclaim handling
+	Needs compatible and correctly configured version of nfs-utils 
+	installed and running on the system.  For clusterfs.sh, ensure
+	that we flush buffers during service tear-down - regardless of
+	whether or not we unmount the file system.
+	* src/utils/clunfslock.sh: HA-callout program (/usr/sbin/clunfslock)
+	for use with the rpc.statd -H parameter.  Copies the client to all
+	cluster-managed mounted file systems so that it will get lock
+	reclaim notification on failover.
+
+2006-05-09 Lon Hohberger <[email protected]>
+	* include/list.h: Prevent dereferencing curr if it's null for some
+	reason
+	* include/resgroup.h: Clean up alignment, add rgmanager lock/unlock
+	message types
+	* src/daemons/Makefile: Add nodeevent.o to the build for rgmanager
+	* src/clulib/msgsimple.c: Misc code path cleanups
+	* src/clulib/vft.c: Add local reads for fast clustat operation.
+	* src/daemons/groups.c: Count all resource groups for all nodes 
+	in one pass, rather than one node per pass.  Split queueing of
+	status checks off so we never block the main thread.  Mark services
+	which have autostart=0 in the config as "disabled" to help remove
+	confusion between "disabled", "stopped", and the no-longer-needed
+	"stopped but behave like disabled" states. bz #182454 /
+	#190234 / #190408	
+	* src/daemons/fo_domain.c: Add patch from Josef Whiter to 
+	implement no-failback option for a given FO domain - bz #189841
+	* src/daemons/main.c: Queue node events for another thread to
+	handle, so we never block the main thread.  Also, implement 
+	cluster-wide service lock/unlock feature from clumanager 1.2.x
+	- bz #175010
+	* src/daemons/nodeevent.c: Split out node event queueing / handling
+	in to a separate thread so the main thread does not block
+	* src/daemons/rg_state.c: Return error codes if resource groups
+	are locked.
+	* src/daemons/rg_thread.c: Fix assertion failure causing segfault
+	in extremely rare cases.  Quash the rg queue during shutdown.
+	- bz #181539
+	* src/daemons/rg_state.c: Add fast local service state query to
+	reduce unnecessary lock contention
+	* src/daemons/groups.c: Handle request for expedited information
+	from clustat.
+	* src/daemons/main.c: Pass arg1 to send_rg_states() to enable fast
+	clustat operation.
+	* src/resources/fs.sh: Implement user/group quota support if 
+	enabled in the file system options
+	* src/utils/clustat.c: Misc. error handling.  Add single service / 
+	member output and add -Q to the help information.  #185952.
+	Added -f flag.
+	* src/utils/clusvcadm.c: Implement client-side of #175010
+	* src/utils/clustat.c: show transition time in clustat -x
+	- bz #191398
+	* src/resources/fs.sh: enable user/group quotas if enabled in the
+	options attribute - bz #191182
+	* init.d/rgmanager: fix typo - bz #191205
+
+
+-------------
+
 2005-03-21 Lon Hohberger <[email protected]>
 	* init.d/rgmanager, Makefile: Fix up init script and add Makefile
 	so that the init script is properly installed #142754
rgmanager/README +0 -4
@@ -1,7 +1,3 @@
-WARNING
-
-This code is not ready for production use.
-
 This is a clustered resource group manager layered on top of Magma, a
 single API which can talk to multiple cluster infrastructures via their
 native APIs.  This resource manager requires both magma and one or more
rgmanager/include/list.h +1 -1
@@ -50,7 +50,7 @@
 	if (*list && (curr = *list)) do
 
 #define list_done(list, curr) \
-	(((curr = (void *)le(curr)->le_next)) && (curr == *list))
+	(curr && (((curr = (void *)le(curr)->le_next)) && (curr == *list)))
 
 /*
    list_do(list, node) {
rgmanager/include/resgroup.h +24 -20

56 lines not on this page · raw message

rgmanager/include/rg_locks.h +2 -3
@@ -4,9 +4,8 @@
 int rg_running(void);
 
 int rg_locked(void);
-int rg_lockall(void);
-int rg_unlockall(void);
-int rg_wait_unlockall(void);
+int rg_lockall(int flag);
+int rg_unlockall(int flag);
 
 int rg_quorate(void);
 int rg_set_quorate(void);
rgmanager/init.d/rgmanager +1 -1
@@ -16,7 +16,7 @@
 # Grab the network config file
 . /etc/sysconfig/network
 
-# Grap cluster start config if it exists
+# Grab cluster start config if it exists
 [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
rgmanager/man/clusvcadm.8 +2 -2
@@ -46,9 +46,9 @@
 .I
 service
 .IP \-l
-Lock the cluster's service managers.  This should only be used if the 
+Lock the local resource group manager.  This should only be used if the 
 administrator intends to perform a global, cluster-wide shutdown.  This
-prevents ALL service operations on ALL currently running members, thus,
+prevents starting resource groups on the local node, allowing 
 services will not fail over during the shutdown of the cluster.  Generally,
 administrators should use the
 .B
rgmanager/src/clulib/clulog.c +2 -2
@@ -20,7 +20,7 @@
 /** @file
  * Library routines for communicating with the logging daemon.
  *
- *  $Id: clulog.c,v 1.2.2.1.6.1 2005/12/06 18:43:45 lhh Exp $
+ *  $Id: clulog.c,v 1.2.2.1.6.2 2006/06/16 20:07:46 lhh Exp $
  *
  *  Author: Jeff Moyer <[email protected]>
  */
@@ -50,7 +50,7 @@
 #include <string.h>
 
 
-static const char *version __attribute__ ((unused)) = "$Revision: 1.2.2.1.6.1 $";
+static const char *version __attribute__ ((unused)) = "$Revision: 1.2.2.1.6.2 $";
 
 #ifdef DEBUG
 #include <assert.h>
rgmanager/src/clulib/msgsimple.c +4 -0
@@ -83,15 +83,19 @@
 	/*
 	 * Peek at the header.  We need the size of the inbound buffer!
 	 */
+	errno = EAGAIN;
 	ret = msg_peek(fd, &peek_msg, sizeof (generic_msg_hdr));
 	if (ret != sizeof (generic_msg_hdr)) {
 		if (ret == -1) {
 			if (errno != ECONNRESET)
 				fprintf(stderr, "fd%d peek: %s\n", fd,
 					strerror(errno));
+			//perror("msg_peek");
 		} else if (ret != 0)	/* Blank message = probably closed socket */
 			fprintf(stderr, "fd%d peek: %d/%d bytes\n", fd,
 			       ret, (int)sizeof (generic_msg_hdr));
+		else if (ret == 0)
+			errno = EAGAIN;
 		return -1;
 	}
 
rgmanager/src/clulib/vft.c +41 -0

47 lines not on this page · raw message

/cvs/cluster/cluster/rgmanager/src/daemons/nodeevent.c,v --> standard output revision 1.2.2.1

- renamed from rgmanager/src/daemons/nodeevent.c +103 -0

103 lines not on this page · raw message

/cvs/cluster/cluster/rgmanager/src/daemons/watchdog.c,v --> standard output revision 1.2.2.1

- renamed from rgmanager/src/daemons/watchdog.c +97 -0

97 lines not on this page · raw message

rgmanager/src/daemons/Makefile +2 -1
@@ -40,7 +40,8 @@
 
 clurgmgrd: rg_thread.o rg_locks.o main.o groups.o rg_state.o \
 		rg_queue.o members.o rg_forward.o reslist.o \
-		resrules.o restree.o fo_domain.o
+		resrules.o restree.o fo_domain.o nodeevent.o \
+		watchdog.o
 	$(CC) -o $@ $^ $(INCLUDE) $(CFLAGS) $(LDFLAGS) -lccs
 
 #
rgmanager/src/daemons/fo_domain.c +76 -1

127 lines not on this page · raw message

rgmanager/src/daemons/groups.c +188 -87

566 lines not on this page · raw message

rgmanager/src/daemons/main.c +123 -32

277 lines not on this page · raw message

rgmanager/src/daemons/restree.c +60 -9

121 lines not on this page · raw message

rgmanager/src/daemons/rg_locks.c +4 -19
@@ -167,11 +167,11 @@
 
 
 int
-rg_lockall(void)
+rg_lockall(int flag)
 {
 	pthread_mutex_lock(&locks_mutex);
 	if (!__rg_lock)
-		__rg_lock = 1;
+		__rg_lock |= flag;
 	pthread_mutex_unlock(&locks_mutex);
 	return 0;
 }
@@ -189,11 +189,11 @@
 
 
 int
-rg_unlockall(void)
+rg_unlockall(int flag)
 {
 	pthread_mutex_lock(&locks_mutex);
 	if (__rg_lock)
-		__rg_lock = 0;
+		__rg_lock &= ~flag;
 	pthread_cond_broadcast(&unlock_cond);
 	pthread_mutex_unlock(&locks_mutex);
 	return 0;
@@ -201,21 +201,6 @@
 
 
 int
-rg_wait_unlockall(void)
-{
-	pthread_mutex_lock(&locks_mutex);
-	if (!__rg_lock) {
-		pthread_mutex_unlock(&locks_mutex);
-		return 0;
-	}
-
-	pthread_cond_wait(&unlock_cond, &locks_mutex);
-	pthread_mutex_unlock(&locks_mutex);
-	return 0;
-}
-
-
-int
 rg_set_quorate(void)
 {
 	pthread_mutex_lock(&locks_mutex);
rgmanager/src/daemons/rg_state.c +158 -25

315 lines not on this page · raw message

rgmanager/src/daemons/rg_thread.c +45 -7

115 lines not on this page · raw message

/cvs/cluster/cluster/rgmanager/src/resources/svclib_nfslock,v --> standard output revision 1.2.2.1

- renamed from rgmanager/src/resources/svclib_nfslock +251 -0

251 lines not on this page · raw message

rgmanager/src/resources/Makefile +1 -1
@@ -20,7 +20,7 @@
 RESOURCES=fs.sh service.sh ip.sh nfsclient.sh nfsexport.sh \
 	script.sh netfs.sh clusterfs.sh smb.sh
 
-TARGETS=${RESOURCES} ocf-shellfuncs
+TARGETS=${RESOURCES} ocf-shellfuncs svclib_nfslock
 
 all:
 
rgmanager/src/resources/clusterfs.sh +39 -2

65 lines not on this page · raw message

rgmanager/src/resources/fs.sh +106 -1

155 lines not on this page · raw message

rgmanager/src/resources/ip.sh +27 -0
@@ -30,6 +30,13 @@
 PATH=/bin:/sbin:/usr/bin:/usr/sbin
 export LC_ALL LANG PATH
 
+# Grab nfs lock tricks if available
+export NFS_TRICKS=1
+if [ -f "$(dirname $0)/svclib_nfslock" ]; then
+	. $(dirname $0)/svclib_nfslock
+	NFS_TRICKS=0
+fi
+
 . $(dirname $0)/ocf-shellfuncs
 
 
@@ -90,6 +97,19 @@
             </shortdesc>
             <content type="boolean" default="1"/>
         </parameter>
+
+	<parameter name="nfslock" inherit="service%nfslock">
+	    <longdesc lang="en">
+	        If set and unmounting the file system fails, the node will
+		try to kill lockd and issue reclaims across all remaining
+		network interface cards.
+	    </longdesc>
+	    <shortdesc lang="en">
+	        Enable NFS lock workarounds
+	    </shortdesc>
+	    <content type="boolean"/>
+	</parameter>
+
     </parameters>
 
     <actions>
@@ -865,6 +885,13 @@
 	fi
 	ip_op ${OCF_RESKEY_family} add ${OCF_RESKEY_address}
 
+	if [ $NFS_TRICKS -eq 0 ]; then
+		if [ "$OCF_RESKEY_nfslock" = "yes" ] || \
+	   	   [ "$OCF_RESKEY_nfslock" = "1" ]; then
+			notify_list_broadcast /var/lib/nfs/statd
+		fi
+	fi
+
 	exit $?
 	;;
 stop)
rgmanager/src/resources/nfsclient.sh +53 -3

80 lines not on this page · raw message

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/ocf-shellfuncs +1 -1
@@ -1,5 +1,5 @@
 #
-# 	$Id: ocf-shellfuncs,v 1.2.2.1 2005/10/17 20:53:12 lhh Exp $
+# 	$Id: ocf-shellfuncs,v 1.2.2.2 2006/06/16 20:07:46 lhh Exp $
 #
 # 	Common helper functions for the OCF Resource Agents supplied by
 # 	heartbeat.
rgmanager/src/resources/service.sh +33 -1
@@ -5,7 +5,12 @@
 # resources. ;(
 #
 
-
+# Grab nfs lock tricks if available
+export NFS_TRICKS=1
+if [ -f "$(dirname $0)/svclib_nfslock" ]; then
+	. $(dirname $0)/svclib_nfslock
+	NFS_TRICKS=0
+fi
 
 meta_data()
 {
@@ -89,6 +94,22 @@
             <content type="boolean"/>
         </parameter>
 
+	<parameter name="nfslock">
+	    <longdesc lang="en">
+	    	Enable NFS lock workarounds.  When used with a compatible
+		HA-callout program like clunfslock, this could be used
+		to provide NFS lock failover, but at significant cost to
+		other services on the machine.  This requires a compatible
+		version of nfs-utils and manual configuration of rpc.statd;
+		see 'man rpc.statd' to see if your version supports
+		the -H parameter.
+	    </longdesc>
+	    <shortdesc lang="en">
+	        Enable NFS lock workarounds
+	    </shortdesc>
+	    <content type="boolean"/>
+	</parameter>
+                
         <parameter name="recovery">
             <longdesc lang="en">
 	        This currently has three possible options: "restart" tries
@@ -144,6 +165,17 @@
 #
 case $1 in
 	start)
+		#
+		# XXX If this is set, we kill lockd.  If there is no
+		# child IP address, then clients will NOT get the reclaim
+		# notification.
+		#
+		if [ $NFS_TRICKS -eq 0 ]; then
+			if [ "$OCF_RESKEY_nfslock" = "yes" ] || \
+	   		   [ "$OCF_RESKEY_nfslock" = "1" ]; then
+				pkill -KILL -x lockd
+			fi
+		fi
 		exit 0
 		;;
 	stop)
rgmanager/src/utils/Makefile +5 -1
@@ -23,7 +23,7 @@
 CFLAGS+= -L${libdir} -DPACKAGE_VERSION=\"${RELEASE}\"
 
 LDFLAGS+= -lmagmamsg -lmagma -lpthread -ldl -lncurses -L../clulib -lclulib -lccs
-TARGETS=clubufflush clufindhostname clustat clusvcadm clulog
+TARGETS=clubufflush clufindhostname clustat clusvcadm clulog clunfslock
 
 all: ${TARGETS}
 
@@ -52,6 +52,10 @@
 clusvcadm: clusvcadm.o
 	$(CC) -o $@ $^ $(INLUDE) $(CFLAGS) $(LDFLAGS)
 
+clunfslock: clunfslock.sh
+	cp clunfslock.sh clunfslock
+	chmod 755 clunfslock
+
 clean:
 	rm -f *.o $(TARGETS)
 
rgmanager/src/utils/clustat.c +183 -61

254 lines not on this page · raw message

rgmanager/src/utils/clusvcadm.c +117 -3

120 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.