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

[Cluster-devel] cluster/rgmanager ChangeLog src/daemons/rg_state.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	mgrac sourceware org	2007-06-28 11:54:50

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/daemons: rg_state.c 

Log message:
	Fix #236431
	Message in log file: Taking over service serv from down member (null)
	shows correct member (if possible).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.26&r2=1.5.2.27
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.20&r2=1.4.2.21

--- cluster/rgmanager/ChangeLog	2007/06/22 08:40:20	1.5.2.26
+++ cluster/rgmanager/ChangeLog	2007/06/28 11:54:50	1.5.2.27
@@ -1,3 +1,7 @@
+2007-06-28 Marek Grac <mgrac at redhat.com>
+	* src/daemons/rg_state.c: Fix #236431. Message: Taking over service
+	serv from down member (null) shows correct member (if possible).
+
 2007-06-22 Marek Grac <mgrac at redhat.com>
 	* src/daemons/reslist.c: Apply patch from Lon (same as in RHEL5) to
 	fix #245171 attr inheritance should try all direct ancestors.
--- cluster/rgmanager/src/daemons/rg_state.c	2007/05/03 15:02:47	1.4.2.20
+++ cluster/rgmanager/src/daemons/rg_state.c	2007/06/28 11:54:50	1.4.2.21
@@ -490,6 +490,9 @@
 {
 	cluster_member_list_t *membership = member_list();
 	int ret = 0;
+	int fd;
+	char *nodename = NULL;
+	char query[255];
 	
 	switch(svcStatus->rs_state) {
 	case RG_STATE_FAILED:
@@ -549,10 +552,19 @@
 		/*
 		 * Service is running but owner is down -> FAILOVER
 		 */
+		fd = ccs_connect();
+		if (fd > 0) {
+			snprintf(query,
+				sizeof(query),
+				"/cluster/clusternodes/clusternode[ nodeid=\"%d\"]/@name",
+				svcStatus->rs_owner);
+			ccs_get(fd, query, &nodename);
+			ccs_disconnect(fd);
+		}
+
 		clulog(LOG_NOTICE,
 		       "Taking over service %s from down member %s\n",
-		       svcName, memb_id_to_name(membership,
-						svcStatus->rs_owner));
+		       svcName, nodename);
 		ret = 1;
 		break;
 


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