Skip to contentSkip to conversation

resource-agents: Fix migrateuriopt setting

PATCH New Lon Hohberger 2 participants 2 messages Dec 6, 2010 – Dec 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 rgmanager/src/resources/vm.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
rgmanager/src/resources/vm.sh +4 -1
index e23d5ba..22f29f1 100644
@@ -810,7 +810,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.
@@ -826,6 +825,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 $?
 }
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/1 resource-agents: Fix migrateuriopt setting

ACK.

Quoted 51 lines · Lon Hohberger

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

---
 rgmanager/src/resources/vm.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
rgmanager/src/resources/vm.sh +4 -1
index e23d5ba..22f29f1 100644
@@ -810,7 +810,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.
@@ -826,6 +825,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 $?
 }
Signature · 1 line
1.7.2.3