cluster: STABLE32 - rgmanager: Small bug in follow-service.sl

Lon Hohberger lon at fedoraproject.org
Thu Mar 1 19:14:35 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c7d3938a3856f9cb295dc6aed8b7f86762cbed7c
Commit:        c7d3938a3856f9cb295dc6aed8b7f86762cbed7c
Parent:        b2012d8fe8b6a30f16091a8c96b5665e34892160
Author:        Marc Grimme <grimme at atix.de>
AuthorDate:    Thu Mar 1 14:06:01 2012 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Thu Mar 1 14:06:01 2012 -0500

rgmanager: Small bug in follow-service.sl

Follow-service was written for use with failover
domains.

When using follow-service without a failover domain,
the available nodelist would be nil.

This patch resolves that issue.

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/resources/follow-service.sl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/rgmanager/src/resources/follow-service.sl b/rgmanager/src/resources/follow-service.sl
index 4c711ec..6c17160 100644
--- a/rgmanager/src/resources/follow-service.sl
+++ b/rgmanager/src/resources/follow-service.sl
@@ -6,7 +6,7 @@
 % Author:       Marc Grimme, Mark Hlawatschek, October 2008
 % Support:      support at atix.de
 % License:      GNU General Public License (GPL), version 2 or later
-% Copyright:    (c) 2008-2010 ATIX AG
+% Copyright:    (c) 2008-2012 ATIX AG
 
 
 debug("*** follow-service.sl");
@@ -21,7 +21,13 @@ define nodelist_online(service_name) {
    
    (nofailback, restricted, ordered, node_list) = service_domain_info(service_name);
    
-   return intersection(nodes, node_list);
+   if ((node_list == NULL) or (node_list == 0)) {
+      debug("service ",service_name, " has no failover domain. Taking all available nodes: ", nodes);
+      return nodes;
+   } else {
+      debug("service ",service_name, " has a failover domain. Taking intersection with available nodes: ", nodes, " => ", node_list);
+      return intersection(nodes, node_list);
+   }
 }
 
 %


More information about the cluster-commits mailing list