This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
STABLE2 - [rgmanager] Apply patch from Marcelo Azevedo to makemigration more robust
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Wed, 24 Sep 2008 06:52:33 +0000 (UTC)
- Subject: STABLE2 - [rgmanager] Apply patch from Marcelo Azevedo to makemigration more robust
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=70928ae17cfc67e76421357000ace3f0f55a5119
Commit: 70928ae17cfc67e76421357000ace3f0f55a5119
Parent: 35fd8a4574edafa4034422a3619b552321acd461
Author: Lon Hohberger <lhh@redhat.com>
AuthorDate: Tue May 20 09:46:13 2008 -0400
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Wed Sep 24 08:51:36 2008 +0200
[rgmanager] Apply patch from Marcelo Azevedo to make migration more robust
* Adds a mapping of cluster nodes to private hostnames for migration
paths
* Makes migration status reporting more robust
---
rgmanager/src/resources/vm.sh | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index bf6af90..e423889 100644
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -118,6 +118,16 @@ meta_data()
<content type="integer"/>
</parameter>
+ <parameter name="migration_mapping">
+ <longdesc lang="en">
+ Mapping of the hostname of a target cluster member to a different hostname
+ </longdesc>
+ <shortdesc lang="en">
+ memeberhost:targethost,memeberhost:targethost ..
+ </shortdesc>
+ <content type="string"/>
+ </parameter>
+
<parameter name="bootloader">
<longdesc lang="en">
Boot loader that can start the VM from physical image
@@ -460,8 +470,14 @@ migrate()
if [ "$OCF_RESKEY_migrate" = "live" ]; then
migrate_opt="-l"
fi
-
- err=$(xm migrate $migrate_opt $OCF_RESKEY_name $target 2>&1 | head -1)
+
+ # Patch from Marcelo Azevedo to migrate over private
+ # LANs instead of public LANs
+ if [ -n $OCF_RESKEY_migration_mapping ] ; then
+ target=${OCF_RESKEY_migration_mapping#*$target:} target=${target%%,*}
+ fi
+
+ err=$(xm migrate $OCF_RESKEY_name $target 2>&1 | head -1; exit ${PIPESTATUS[0]})
rv=$?
if [ $rv -ne 0 ]; then