Skip to contentSkip to conversation

conga/ricci/modules/cluster Clusvcadm.cpp

Cluster-devel [email protected] 1 participant 1 message Mar 8, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-03-08 06:05:08

Modified files:
ricci/modules/cluster: Clusvcadm.cpp

Log message:
prepend 'vm:' to rgmanager vm service names when issuing clusvcadm commands

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.1&r2=1.7.2.2

ricci/modules/cluster/Clusvcadm.cpp +5 -3
@@ -80,6 +80,7 @@
   pair<list<String>, list<ServiceStatus> > info = service_states();
   list<String> nodes = info.first;
   list<ServiceStatus> services = info.second;
+  String svcname = servicename;
   
   // check if node can run services
   bool node_found = false;
@@ -105,9 +106,10 @@
 	flag = "-e";
       else if (iter->status == ServiceStatus::RG_STATE_STARTED ||
 	       iter->status == ServiceStatus::RG_STATE_STARTING) {
-	if (iter->vm)
+	if (iter->vm) {
 	  flag = "-M";
-	else
+      svcname = "vm:" + servicename;
+	} else
 	  flag = "-r";
       }
       
@@ -116,7 +118,7 @@
 	int status;
 	vector<String> args;
 	args.push_back(flag);
-	args.push_back(servicename);
+	args.push_back(svcname);
 	if (nodename.size()) {
 	  args.push_back("-m");
 	  args.push_back(nodename);