Skip to contentSkip to conversation

cluster/rgmanager ChangeLog include/resgroup.h ...

Cluster-devel [email protected] 1 participant 1 message Oct 6, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: lhh at sourceware.org 2006-10-06 21:22:28

Modified files:
rgmanager : ChangeLog
rgmanager/include: resgroup.h
rgmanager/src/daemons: groups.c main.c
rgmanager/src/utils: clustat.c

Log message:

	Fix #202497

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.27&r2=1.28
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/include/resgroup.h.diff?cvsroot=cluster&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/groups.c.diff?cvsroot=cluster&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/main.c.diff?cvsroot=cluster&r1=1.32&r2=1.33
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/clustat.c.diff?cvsroot=cluster&r1=1.23&r2=1.24

rgmanager/ChangeLog +10 -0
@@ -1,3 +1,13 @@
+2006-10-06 Lon Hohberger <[email protected]>
+	* src/daemons/main.c: Fix #202497: provide rgmanager's view of
+	who is running rgmanager to clustat.
+	* src/daemons/groups.c: Fix tiny memory leak during configuration
+	changes
+	* include/resgroup.h: #202497: Flip unused RG_STATUS_INQUIRY to
+	RG_STATUS_NODE.
+	* src/utils/clustat.c: #202497: Send RG_STATUS_NODE to clurgmgrd
+	in order to obtain rgmanager "group" status information
+
 2006-09-27 Lon Hohberger <[email protected]>
 	* src/daemons/rg_state.c: Fix #208011 - failed->disabled state 
 	transition.  Fix node ID type.
rgmanager/include/resgroup.h +1 -1
@@ -68,7 +68,7 @@
 #define RG_EXITING	  9 
 #define RG_INIT		  10
 #define RG_ENABLE	  11
-#define RG_STATUS_INQUIRY 12
+#define RG_STATUS_NODE	  12
 #define RG_RELOCATE	  13
 #define RG_CONDSTOP	  14
 #define RG_CONDSTART	  15
rgmanager/src/daemons/groups.c +1 -0
@@ -1228,6 +1228,7 @@
 		pthread_mutex_lock(&config_mutex);
 		config_version = atoi(val);
 		pthread_mutex_unlock(&config_mutex);
+		free(val);
 	}
 
 	clulog(LOG_DEBUG, "Building Resource Trees\n");
rgmanager/src/daemons/main.c +27 -2
@@ -87,6 +87,26 @@
 
 
 void
+send_node_states(msgctx_t *ctx)
+{
+	int x;
+	generic_msg_hdr hdr;
+	cluster_member_list_t *ml = member_list();
+
+	for (x = 0; x < ml->cml_count; x++) {
+		if (ml->cml_members[x].cn_member == 1) {
+			msg_send_simple(ctx, RG_STATUS_NODE,
+					ml->cml_members[x].cn_nodeid, 0);
+		}
+	}
+	msg_send_simple(ctx, RG_SUCCESS,
+			ml->cml_members[x].cn_nodeid, 0);
+	msg_receive(ctx, &hdr, sizeof(hdr), 10);
+	free_member_list(ml);
+}
+
+
+void
 flag_reconfigure(int sig)
 {
 	need_reconfigure++;
@@ -417,8 +437,13 @@
 	switch (msg_hdr->gh_command) {
 	case RG_STATUS:
 		clulog(LOG_DEBUG, "Sending service states to CTX%p\n",ctx);
-		send_rg_states(ctx, msg_hdr->gh_arg1);
-		need_close = 0;
+		if (send_rg_states(ctx, msg_hdr->gh_arg1) == 0)
+			need_close = 0;
+		break;
+
+	case RG_STATUS_NODE:
+		clulog(LOG_DEBUG, "Sending node states to CTX%p\n",ctx);
+		send_node_states(ctx);
 		break;
 
 	case RG_LOCK:
rgmanager/src/utils/clustat.c +91 -0

103 lines not on this page · raw message