[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:	lhh sourceware org	2006-09-27 12:22:41

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

Log message:
	Fix failed->disabled state transitions; #208011

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.5.2.21&r2=1.5.2.22
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.14&r2=1.4.2.15

--- cluster/rgmanager/ChangeLog	2006/09/07 18:39:45	1.5.2.21
+++ cluster/rgmanager/ChangeLog	2006/09/27 12:22:41	1.5.2.22
@@ -1,3 +1,7 @@
+2006-09-27 Lon Hohberger <lhh at redhat.com>
+	* src/daemons/rg_state.c: Fix fail->disable state transitions,
+	bugzilla #208011
+
 2006-09-07 Lon Hohberger <lhh at redhat.com>
 	* src/daemons/main.c, init.d/rgmanager: Make rgmanager init script
 	report failure correctly in most cases. (#193603)
--- cluster/rgmanager/src/daemons/rg_state.c	2006/06/16 19:57:52	1.4.2.14
+++ cluster/rgmanager/src/daemons/rg_state.c	2006/09/27 12:22:41	1.4.2.15
@@ -879,6 +879,7 @@
 	void *lockp = NULL;
 	rg_state_t svcStatus;
 	int ret;
+	int old_state;
 
 	if (!rg_quorate()) {
 		clulog(LOG_WARNING, "#69: Unclean %s of %s\n", 
@@ -918,6 +919,8 @@
 		break;
 	}
 
+	old_state = svcStatus.rs_state;
+
 	clulog(LOG_NOTICE, "Stopping service %s\n", svcName);
 
 	if (recover)
@@ -937,7 +940,14 @@
 
 	ret = group_op(svcName, RG_STOP);
 
-	_svc_stop_finish(svcName, ret, newstate);
+	if (old_state == RG_STATE_FAILED && newstate == RG_STATE_DISABLED) {
+		if (ret)
+			clulog(LOG_ALERT, "Marking %s as 'disabled', "
+			       "but some resources may still be allocated!\n");
+		_svc_stop_finish(svcName, 0, newstate);
+	} else {
+		_svc_stop_finish(svcName, ret, newstate);
+	}
 
 	return ret;
 }


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