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

[Cluster-devel] [PATCH] rgmanager: Fix dependency restart bug [RHEL5]



If we:
 - had a service with 'depend' set on another
   service,
 - both services were running on the same host,
 - that host died, and
 - the service which depended on the other service
   also had the 'restart' recovery policy,

rgmanager would enter handle_start_req and return
an immediate error - with no further recovery action
performed.

Resolves: rhbz#743442

Signed-off-by: Lon Hohberger <lhh redhat com>
---
 rgmanager/src/daemons/rg_state.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index dce28db..c02bfda 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2131,8 +2131,16 @@ handle_start_req(char *svcName, int req, int *new_owner)
 
 	/* Check for dependency.  We cannot start unless our
 	   dependency is met */
-	if (check_depend_safe(svcName) == 0)
+	if (check_depend_safe(svcName) == 0) {
+		if (req == RG_START_RECOVER) {
+			clulog(LOG_INFO, "Dependency for %s missing "
+			       "during recovery; marking as stopped",
+			       svcName);
+
+			_svc_stop_finish(svcName, 0, RG_STATE_STOPPED);
+		}
 		return RG_EDEPEND;
+	}
 	
 	/*
 	 * This is a 'root' start request.  We need to clear out our failure
-- 
1.7.3.4


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