[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/rgmanager/src/resources vm.sh



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh sourceware org	2007-11-14 18:58:26

Modified files:
	rgmanager/src/resources: vm.sh 

Log message:
	Fix #345871 - make default migration policy live instead of paused

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/resources/vm.sh.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.7&r2=1.1.2.8

--- cluster/rgmanager/src/resources/vm.sh	2007/08/02 14:46:52	1.1.2.7
+++ cluster/rgmanager/src/resources/vm.sh	2007/11/14 18:58:26	1.1.2.8
@@ -123,7 +123,6 @@
             <content type="string"/>
         </parameter>
 
-
 	<parameter name="rootdisk_physical" unique="1">
 	    <longdesc lang="en">
 		Root disk for the virtual machine.  (physical, on the host)
@@ -175,6 +174,15 @@
             <content type="string"/>
         </parameter>
 
+	<parameter name="migrate">
+	    <longdesc lang="en">
+	    	Migration type live or pause, default = live.
+	    </longdesc>
+	    <shortdesc lang="en">
+	    	Migration type live or pause, default = live.
+	    </shortdesc>
+            <content type="string" default="live"/>
+        </parameter>
 
     </parameters>
 
@@ -258,6 +266,8 @@
 		path)
 			cmdline="$cmdline --path=\"$val\""
 			;;
+		migrate)
+			;;
 		*)
 			cmdline="$cmdline $varp=\"$val\""
 			;;
@@ -377,9 +387,13 @@
 migrate()
 {
 	declare target=$1
-	declare errstr rv
+	declare errstr rv migrate_opt
+
+	if [ "$OCF_RESKEY_migrate" = "live" ]; then
+		migrate_opt="-l"
+	fi
 	
-	err=$(xm migrate $OCF_RESKEY_name $target 2>&1 | head -1)
+	err=$(xm migrate $migrate_opt $OCF_RESKEY_name $target 2>&1 | head -1)
 	rv=$?
 
 	if [ $rv -ne 0 ]; then


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]