cluster: RHEL56 - resource-agents: Fix migrateuriopt setting

Lon Hohberger lon at fedoraproject.org
Tue Dec 7 15:39:58 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=4b3e4e9e0a98a35216f717eb369fbad479596503
Commit:        4b3e4e9e0a98a35216f717eb369fbad479596503
Parent:        c80b1f7e9a8152f4a9c6fb187b8d22fe69311b38
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Thu Dec 2 14:40:18 2010 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Tue Dec 7 10:37:48 2010 -0500

resource-agents: Fix migrateuriopt setting

When a user was specifically setting migration_uri (for example,
to get around ssh banners causing migration to fail),
vm.sh was leaving the migrateuriopt variable unset when using
QEMU/KVM.  This caused the printf() during command line generation
to be incorrect.

This means the generated command line looked like this:

	virsh migrate --live vm1 \
 	   qemu+ssh://node1.example.com/system?command=/bin/quiet_ssh.sh
	   node1.example.com

Instead of:

	virsh migrate --live vm1 \
 	   qemu+ssh://node1.example.com/system?command=/bin/quiet_ssh.sh
	   tcp:node1.example.com
	   ^^^^

Resolves: rhbz#659477

Signed-off-by: Lon Hohberger <lhh at redhat.com>
Reviewed-by: Ryan O'Hara <rohara at redhat.com>
---
 rgmanager/src/resources/vm.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index a7a458b..7310da3 100755
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -812,7 +812,6 @@ validate_all()
 		# Virsh makes it easier to do this.  Really.
 		if [ "$OCF_RESKEY_hypervisor" = "qemu" ]; then
 			export OCF_RESKEY_migration_uri="qemu+ssh://%s/system"
-			export migrateuriopt="tcp:%s"
 		fi
 
 		# I just need to believe in it more.
@@ -828,6 +827,10 @@ validate_all()
 		return $OCF_ERR_ARGS
 	fi
 
+	if [ "$OCF_RESKEY_hypervisor" = "qemu" ]; then
+		export migrateuriopt="tcp:%s"
+	fi
+
 	#virsh list --all | awk '{print $2}' | grep -q "^$OCF_RESKEY_name\$"
 	return $?
 }


More information about the cluster-commits mailing list