cluster: RHEL58 - rgmanager: Fix dependency issue related to ordering
Lon Hohberger
lon at fedoraproject.org
Thu Jan 5 16:43:41 UTC 2012
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=64ba5d035d8d477e0986e75c3d37e2625861bf9c
Commit: 64ba5d035d8d477e0986e75c3d37e2625861bf9c
Parent: 07891324276c5414e6000b50bccafe9235bd4a4a
Author: Lon Hohberger <lhh at redhat.com>
AuthorDate: Thu Jan 5 10:43:12 2012 -0500
Committer: Lon Hohberger <lhh at redhat.com>
CommitterDate: Thu Jan 5 11:33:05 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#743214
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 f2c7bc1..62de2d2 100644
--- a/rgmanager/src/resources/default_event_script.sl
+++ b/rgmanager/src/resources/default_event_script.sl
@@ -156,7 +156,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");
()=service_stop(service);
return ERR_DEPEND;
More information about the cluster-commits
mailing list