This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE2 - rgmanager: Fix poor -F handling on enable


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=bdc30e4a863ae587bddde87e4a4be51386c3966e
Commit:        bdc30e4a863ae587bddde87e4a4be51386c3966e
Parent:        b6dffa47f936007ebe42319147e14cd400b9fc0e
Author:        Yevheniy Demchenko <zheka@uvt.cz>
AuthorDate:    Thu Feb 26 15:17:23 2009 -0500
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Fri Feb 27 09:46:38 2009 -0500

rgmanager: Fix poor -F handling on enable

Fixes these two issues (rhbz486711, rhbz486717):
* Rgmanager crashes if no members of a restricted
  failover domain are online and you enable with -F
* Rgmanager does not correctly restart services if
  they fail on the first node when using -F during
  enable

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 rgmanager/src/daemons/rg_state.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
index 0edd3b4..e987a58 100644
--- a/rgmanager/src/daemons/rg_state.c
+++ b/rgmanager/src/daemons/rg_state.c
@@ -2153,13 +2153,16 @@ handle_fd_start_req(char *svcName, int request, int *new_owner)
 		target = best_target_node(allowed_nodes, 0,
 	 				  svcName, 1);
 	  	if (target == me) {
-	   		ret = handle_start_remote_req(svcName, request);
+ 		      	ret = handle_start_remote_req(svcName,
+				(request==RG_ENABLE?RG_START_RECOVER:request));
 			if (ret == RG_EAGAIN)
 				goto out;
-	    	} else if (target < 0) {
+		} else if (!(target > 0)) {
 			goto out;
 	       	} else {
-			ret = svc_start_remote(svcName, RG_START_REMOTE,
+			ret = svc_start_remote(svcName,
+					       (request==RG_ENABLE?
+					    RG_START_RECOVER:RG_START_REMOTE),
 					       target);
 		}
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]