From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 10 Mar 2007 04:57:48 -0000 Subject: [Cluster-devel] conga/ricci docs/cluster_api.html modules/clus ... Message-ID: <20070310045748.10069.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 @@
  • migrate_service

      -

      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. +

      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.???

      Input variables:
      - ???servicename??? (string) ??? name of the virtual service to migrate.
      - ???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 ||