[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
Changes by:	lhh sourceware org	2006-09-27 12:26:17

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&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/daemons/rg_state.c.diff?cvsroot=cluster&r1=1.20&r2=1.21

--- cluster/rgmanager/ChangeLog	2006/09/01 19:02:20	1.23
+++ cluster/rgmanager/ChangeLog	2006/09/27 12:26:16	1.24
@@ -1,3 +1,7 @@
+2006-09-27 Lon Hohberger <lhh at redhat.com>
+	* src/daemons/rg_state.c: Fix #208011 - failed->disabled state 
+	transition
+
 2006-09-01 Lon Hohberger <lhh at redhat.com>
 	* include/resgroup.h: Add proto for rg_strerror
 	* include/vf.h: Add proto for vf_invalidate (flushes vf cache)
--- cluster/rgmanager/src/daemons/rg_state.c	2006/08/18 15:26:22	1.20
+++ cluster/rgmanager/src/daemons/rg_state.c	2006/09/27 12:26:17	1.21
@@ -947,6 +947,7 @@
 	struct dlm_lksb lockp;
 	rg_state_t svcStatus;
 	int ret;
+	int old_state;
 
 	if (!rg_quorate()) {
 		clulog(LOG_WARNING, "#69: Unclean %s of %s\n", 
@@ -986,6 +987,8 @@
 		break;
 	}
 
+	old_state = svcStatus.rs_state;
+
 	clulog(LOG_NOTICE, "Stopping service %s\n", svcName);
 
 	if (recover)
@@ -1005,7 +1008,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]