cluster: RHEL55 - rgmanager: Fix clusvcadm error reporting

Lon Hohberger lon at fedoraproject.org
Wed Dec 2 21:28:10 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=961556c5048166a95e11994b5821d8616be17c3b
Commit:        961556c5048166a95e11994b5821d8616be17c3b
Parent:        bae65a5e718229e778302cd2e5c1458e95dfd426
Author:        Toure Dunnon <tdunnon at redhat.com>
AuthorDate:    Tue Nov 10 17:07:20 2009 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Wed Dec 2 16:27:12 2009 -0500

rgmanager: Fix clusvcadm error reporting

This patch makes clusvcadm's error reporting when
trying to migrate to an offline node consistent
with trying to migrate to a nonexistent node.

Resolves: rhbz#536157

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/utils/clusvcadm.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/utils/clusvcadm.c b/rgmanager/src/utils/clusvcadm.c
index 789ab1b..b1ee885 100644
--- a/rgmanager/src/utils/clusvcadm.c
+++ b/rgmanager/src/utils/clusvcadm.c
@@ -377,6 +377,11 @@ main(int argc, char **argv)
 			if (!svctarget)
 				return 1;
 		}
+		if (action == RG_MIGRATE && 
+		    memb_online(membership, svctarget) == 0) {
+			printf("'%s' is offline\n", nodename);
+			return 1;
+		}
 	} else {
 		svctarget = 0;
 		/*


More information about the cluster-commits mailing list