Skip to contentSkip to conversation

rgmanager: Don't immediately stop services that have started sucessfully

PATCH New Ryan McCabe 2 participants 2 messages Jun 28, 2012 – Jul 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 3/5 rgmanager: Don't immediately stop services that have started sucessfully

This patch fixes a bug that caused services to be started, then immediately stopped during recovery. This occurred when a service had its recovery policy set to relocate and was in a restricted failover domain. If starting the service failed on other nodes in the failover domain, the service would be restarted on the original node, then immediately stopped, even if it had started successfully. This patch causes rgmanager to leave the service running if it restarted successfully.

Resolves: rhbz#789366

---
 rgmanager/src/daemons/rg_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rgmanager/src/daemons/rg_state.c +1 -1
index a8b1e36..4357d21 100644
@@ -2061,7 +2061,7 @@ exhausted:
 		       svcName);
 		if (svc_start(svcName, RG_START_RECOVER) == 0) {
 			*new_owner = me;
-			return RG_EFAIL;
+			return 0;
 		}
 	}
 
Signature · 1 line
1.7.10.2
#1 lore raw

PATCH 3/5 rgmanager: Don't immediately stop services that have started sucessfully

ACK

Quoted 30 lines · Ryan McCabe

This patch fixes a bug that caused services to be started, then immediately stopped during recovery. This occurred when a service had its recovery policy set to relocate and was in a restricted failover domain. If starting the service failed on other nodes in the failover domain, the service would be restarted on the original node, then immediately stopped, even if it had started successfully. This patch causes rgmanager to leave the service running if it restarted successfully.

Resolves: rhbz#789366

---
 rgmanager/src/daemons/rg_state.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rgmanager/src/daemons/rg_state.c +1 -1
index a8b1e36..4357d21 100644
@@ -2061,7 +2061,7 @@ exhausted:
 		       svcName);
 		if (svc_start(svcName, RG_START_RECOVER) == 0) {
 			*new_owner = me;
-			return RG_EFAIL;
+			return 0;
 		}
 	}