cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] rgmanager: Fix dependency restart bug [RHEL5]
@ 2011-10-11 23:02 Lon Hohberger
  2011-10-12  6:39 ` Fabio M. Di Nitto
  0 siblings, 1 reply; 2+ messages in thread
From: Lon Hohberger @ 2011-10-11 23:02 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-12  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 23:02 [Cluster-devel] [PATCH] rgmanager: Fix dependency restart bug [RHEL5] Lon Hohberger
2011-10-12  6:39 ` Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).