FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 01-05-2012, 02:57 PM
Lon Hohberger
 
Default rgmanager: Fix dependency issue related to ordering (RHEL5)

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@redhat.com>
---
rgmanager/src/resources/default_event_script.sl | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl
index f2c7bc1..be434e9 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;
@@ -521,8 +523,8 @@ define default_service_event_handler()
(s_trans,,,,,, s_state) = service_status(service_name, 1);
if ((s_state == "started") and (state == "started") and
(d_trans >= s_trans)) {
- %debug("S:", service_name, " trans ", s_trans);
- %debug("D:", services[x], " trans ", d_trans);
+ debug("S:", service_name, " trans ", s_trans);
+ debug("D:", services[x], " trans ", d_trans);

debug("Skipping ", services[x],
"; restart not needed");
--
1.7.3.4
 

Thread Tools




All times are GMT. The time now is 05:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org