cluster: STABLE32 - rgmanager: Fix for services stuck in recovery

Ryan McCabe rmccabe at fedoraproject.org
Mon Jul 16 15:00:48 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=03e2215bd277fd79b8a6ee70a49de711e0f343ad
Commit:        03e2215bd277fd79b8a6ee70a49de711e0f343ad
Parent:        e080a6249f25a3bc18a6c9028c9da06bf4ef14c6
Author:        Ryan McCabe <rmccabe at redhat.com>
AuthorDate:    Mon Jul 16 10:57:28 2012 -0400
Committer:     Ryan McCabe <rmccabe at redhat.com>
CommitterDate: Mon Jul 16 10:57:28 2012 -0400

rgmanager: Fix for services stuck in recovery

Patch from John Ruemker <jruemker at redhat.com>:

"When starting rgmanager throughout the cluster around the same
time, multiple nodes may end up acting as the "root" for a particular
service. If that service happens to fail on startup, you can end up
with each of those nodes sending remote-start requests around the
cluster.  Eventually the service will get stuck in a recovering state,
and cannot be modified in any way with clusvcadm. The only remedy we've
found is to kill rgmanager and start it back up.

Acked-by: Lon Hohberger <lhh at redhat.com>
Signed-off-by: Ryan McCabe <rmccabe at redhat.com>
---
 rgmanager/src/daemons/groups.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/rgmanager/src/daemons/groups.c b/rgmanager/src/daemons/groups.c
index 4a72cb7..4537cc8 100644
--- a/rgmanager/src/daemons/groups.c
+++ b/rgmanager/src/daemons/groups.c
@@ -731,7 +731,8 @@ eval_groups(int local, uint32_t nodeid, int nodeStatus)
 		    (svcStatus.rs_state == RG_STATE_STARTED ||
 		     svcStatus.rs_state == RG_STATE_RECOVER ||
 		     svcStatus.rs_state == RG_STATE_STARTING ||
-		     svcStatus.rs_state == RG_STATE_STOPPING )) {
+		     svcStatus.rs_state == RG_STATE_STOPPING ||
+		     svcStatus.rs_state == RG_STATE_ERROR)) {
 
 			logt_print(LOG_DEBUG,
 				   "Marking %s on down member %d as stopped",
@@ -773,7 +774,8 @@ eval_groups(int local, uint32_t nodeid, int nodeStatus)
 		/* Disabled/failed/in recovery?  Do nothing */
 		if ((svcStatus.rs_state == RG_STATE_DISABLED) ||
 		    (svcStatus.rs_state == RG_STATE_FAILED) ||
-		    (svcStatus.rs_state == RG_STATE_RECOVER)) {
+		    (svcStatus.rs_state == RG_STATE_RECOVER) || 
+		    (svcStatus.rs_state == RG_STATE_ERROR)) {
 			continue;
 		}
 


More information about the cluster-commits mailing list