conga/ricci docs/cluster_api.html modules/clus ...
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-03-10 05:00:35
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&only_with_tag=RHEL5&r1=1.4.2.2&r2=1.4.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.3&r2=1.7.2.4
ricci/docs/cluster_api.html +1 -1
@@ -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) ???
ricci/modules/cluster/Clusvcadm.cpp +11 -1
@@ -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 ||