cluster: STABLE32 - rgmanager: Fix dependency issue related to ordering
Lon Hohberger
lon at fedoraproject.org
Thu Jan 5 16:32:42 UTC 2012
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e66cf5f585812e24f5e82a424d50cc2a4fec039d
Commit: e66cf5f585812e24f5e82a424d50cc2a4fec039d
Parent: 8ce53c09ea6fe55b18ae15ad8620dd1873ff43cb
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:31:48 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().
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 bd445c0..c54c068 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");
()=service_stop(service);
return ERR_DEPEND;
More information about the cluster-commits
mailing list