Skip to contentSkip to conversation

cluster ccs/ccs_tool/update.c ccs/daemon/clust ...

Cluster-devel [email protected] 1 participant 1 message Oct 26, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: lhh at sourceware.org 2007-10-26 20:15:37

Modified files:

	ccs/ccs_tool   : update.c 
	ccs/daemon     : cluster_mgr.c 
	magma/lib      : magmamsg.h memberlist.c message.c 
	rgmanager      : ChangeLog 

rgmanager/src/daemons: main.c rgmanager/src/utils: clustat.c clusvcadm.c

Log message:
Fix bugzillas #298831, #298861, #354391 - apps using magmamsg don't connect from correct source IP on multi-homed hosts

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/ccs_tool/update.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.1.2.4&r2=1.1.2.4.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/daemon/cluster_mgr.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.10.2.8&r2=1.10.2.8.6.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma/lib/magmamsg.h.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.5&r2=1.5.18.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma/lib/memberlist.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.6&r2=1.6.18.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/magma/lib/message.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.9.2.3&r2=1.9.2.3.10.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.5.2.32.2.1&r2=1.5.2.32.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/main.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.9.2.22&r2=1.9.2.23
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/clustat.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.19&r2=1.5.2.20
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/utils/clusvcadm.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.2.2.9&r2=1.2.2.10

ccs/ccs_tool/update.c +3 -0
@@ -80,6 +80,7 @@
 }
 
 int update(char *location){
+  uint64_t nid;
   int error = 0;
   int i, fd;
   int cluster_fd = -1;
@@ -190,6 +191,8 @@
   
   membership = clu_member_list(NULL);
   msg_update(membership);
+  clu_local_nodeid(NULL, &nid);
+  msg_set_nodeid(nid);
   memb_resolve_list(membership, NULL);
 
 
ccs/daemon/cluster_mgr.c +3 -0
@@ -306,6 +306,7 @@
 
 
 static void cluster_communicator(void){
+  uint64_t nid;
   int cluster_fd = -1;
   int listen_fds[2], listeners;
   int warn_user = 0;
@@ -371,6 +372,8 @@
 
   membership = clu_member_list(NULL);
   msg_update(membership);
+  clu_local_nodeid(NULL, &nid);
+  msg_set_nodeid(nid);
   memb_resolve_list(membership, NULL);
 
   while(1) {
magma/lib/Attic/magmamsg.h +1 -0
@@ -22,6 +22,7 @@
 #include <magma.h>
 
 int msg_update(cluster_member_list_t *membership);
+int msg_set_nodeid(uint64_t nodeid);
 void msg_shutdown(void);
 ssize_t msg_receive_timeout(int fd, void *buf, ssize_t count,
 			    unsigned int timeout);
magma/lib/Attic/memberlist.c +1 -1
@@ -234,7 +234,7 @@
 {
 	int x;
 
-	if (!list)
+	if (!list || nodeid == NODE_ID_NONE)
 		return NULL;
 
 	for (x = 0; x < list->cml_count; x++) {
magma/lib/Attic/message.c +72 -4

140 lines not on this page · raw message

rgmanager/ChangeLog +5 -0
@@ -1,3 +1,8 @@
+2007-10-26 Lon Hohberger <[email protected]>
+	* src/daemons/main.c, src/utils/clustat.c, clusvcadm.c: Call
+	msg_set_nodeid() to ensure we route from the right IP on a 
+	host with multiple IPs on our cluster subnet.
+
 2007-10-03 Lon hohberger <[email protected]>
 	* ChangeLog: Fix dates.
 	* include/reslist.h: Actually commit fix for #310981
rgmanager/src/daemons/main.c +1 -0
@@ -870,6 +870,7 @@
 
 	clu_local_nodeid(NULL, &myNodeID);
 	set_my_id(myNodeID);
+	msg_set_nodeid(myNodeID);
 
 	/*
 	   Initialize the VF stuff.
rgmanager/src/utils/clustat.c +1 -0
@@ -637,6 +637,7 @@
 	/* Grab the local node ID and flag it from the list of reported
 	   online nodes */
 	clu_local_nodeid(NULL, lid);
+	msg_set_nodeid(*lid);
 
 	if (!all)
 		return NULL;
rgmanager/src/utils/clusvcadm.c +1 -0
@@ -324,6 +324,7 @@
 	membership = clu_member_list(RG_SERVICE_GROUP);
 	msg_update(membership);
 	clu_local_nodeid(RG_SERVICE_GROUP, &me);
+	msg_set_nodeid(me);
 
 	if (node_specified) {
 		msgtarget = memb_name_to_id(membership, nodename);