[Cluster-devel] conga/ricci docs/cluster_api.html modules/clus ...

rmccabe at sourceware.org rmccabe at sourceware.org
Sat Mar 10 04:57:48 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-03-10 04:57:47

Modified files:
	ricci/docs     : cluster_api.html 
	ricci/modules/cluster: Clusvcadm.cpp 

Log message:
	- Add recognition of the RG_STATE_MIGRATE service state
	- Do not allow a service to be migrated, started, or restarted if it is currently in the process of being migrated

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/docs/cluster_api.html.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&r1=1.10&r2=1.11

--- conga/ricci/docs/cluster_api.html	2007/03/09 22:48:20	1.6
+++ conga/ricci/docs/cluster_api.html	2007/03/10 04:57:47	1.7
@@ -86,7 +86,7 @@
 	</UL>
 	<LI><P>migrate_service</P>
 	<UL>
-		<P>Migrate the virtual service “servicename” to cluster node “nodename.” The virtual service “servicename” must be running, and xend must be running and configured to allow live migration on both nodes.
+		<P>Migrate the virtual service “servicename” to cluster node “nodename.” To migrate the virtual service, it must be started, and xend must be running and configured to allow live migration on both its current node and on “nodename.” If the service is not started, it will be started on “nodename.”
 		</P>
 		<P>Input variables:<BR>- “servicename” (string) – name of
 		the virtual service to migrate.<BR>- “nodename” (string) – 
--- conga/ricci/modules/cluster/Clusvcadm.cpp	2007/03/09 22:48:20	1.10
+++ conga/ricci/modules/cluster/Clusvcadm.cpp	2007/03/10 04:57:47	1.11
@@ -47,7 +47,8 @@
 	      RG_STATE_CHECK           = 116,    // Checking status
 	      RG_STATE_ERROR           = 117,    // Recoverable error
 	      RG_STATE_RECOVER         = 118,    // Pending recovery
-	      RG_STATE_DISABLED        = 119};   // Resource not allowd to run
+	      RG_STATE_DISABLED        = 119,    // Resource not allowd to run
+	      RG_STATE_MIGRATE         = 120};   // Resource migrating
   
   ServiceStatus(const String& name,
 		const String& node, 
@@ -96,6 +97,10 @@
        iter++)
     if (iter->name == servicename) {
       String flag;
+
+      if (iter->status == ServiceStatus::RG_STATE_MIGRATE)
+         throw String(servicename + " is in the process of being migrated");
+		
       if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
 	  iter->status == ServiceStatus::RG_STATE_STOPPING ||
 	  iter->status == ServiceStatus::RG_STATE_FAILED ||
@@ -156,6 +161,8 @@
 		continue;
     if (iter->name == servicename) {
       String flag;
+      if (iter->status == ServiceStatus::RG_STATE_MIGRATE)
+         throw String(servicename + " is already in the process of being migrated");
       if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
 	  iter->status == ServiceStatus::RG_STATE_STOPPING ||
 	  iter->status == ServiceStatus::RG_STATE_FAILED ||
@@ -233,6 +240,9 @@
        iter++)
     if (iter->name == servicename) {
       String flag;
+      if (iter->status == ServiceStatus::RG_STATE_MIGRATE)
+         throw String(servicename + " is in the process of being migrated");
+
       if (iter->status == ServiceStatus::RG_STATE_STOPPED ||
 	  iter->status == ServiceStatus::RG_STATE_STOPPING ||
 	  iter->status == ServiceStatus::RG_STATE_FAILED ||




More information about the Cluster-devel mailing list