cluster: RHEL6 - rgmanager: Fix dependency issue related to ordering

Lon Hohberger lon at fedoraproject.org
Wed Feb 22 14:46:47 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4758c35d2a9862bd7a8ac79d5c2239b6a79ca0bf
Commit:        4758c35d2a9862bd7a8ac79d5c2239b6a79ca0bf
Parent:        2543119ffd1ee25ff8e6f205f696f1f53a5292cf
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Thu Jan 5 10:43:12 2012 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Tue Feb 21 13:34:21 2012 -0500

rgmanager: Fix dependency issue related to ordering

If you ordered two services the opposite way in cluster.conf
('b' first, which depends on 'a'), then rgmanager would fail
over 'b' despite the fact that 'a' was not running yet - this
is because the state of 'a' was not set to 'stopped' - so we
need to check for a node-death event in move_or_start().

Resolves: rhbz#743218

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/resources/default_event_script.sl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index f3b35cd..b14f466 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -176,7 +176,9 @@ define move_or_start(service, node_list)
 	depends = service_property(service, "depend");
 	if (depends != "") {
 		(,,, owner, state) = service_status(depends);
-		if (owner < 0) {
+		if ((owner < 0) or
+                    ((event_type == EVENT_NODE) and (owner == node_id) and
+		     (node_state == 0))) {
 			debug(service, " is not runnable; dependency not met");
 			return ERR_DEPEND;
 		}


More information about the cluster-commits mailing list