cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] cluster/rgmanager/src/resources vm.sh
@ 2007-06-22 16:59 lhh
  0 siblings, 0 replies; 2+ messages in thread
From: lhh @ 2007-06-22 16:59 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at sourceware.org	2007-06-22 16:59:50

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

Log message:
	Fix missing migrate operation on vm.sh

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.2&r2=1.1.2.3

--- cluster/rgmanager/src/resources/vm.sh	2007/05/02 18:26:26	1.1.2.2
+++ cluster/rgmanager/src/resources/vm.sh	2007/06/22 16:59:50	1.1.2.3
@@ -181,8 +181,8 @@
         <action name="stop" timeout="120"/>
 	
 	<!-- No-ops.  Groups are abstract resource types.  -->
-        <action name="status" timeout="10" interval="30"/>
-        <action name="monitor" timeout="10" interval="30"/>
+        <action name="status" timeout="10" interval="30m"/>
+        <action name="monitor" timeout="10" interval="30m"/>
 
 	<!-- reconfigure - reconfigure with new OCF parameters.
 	     NOT OCF COMPATIBLE AT ALL -->
@@ -367,14 +367,15 @@
 {
 	declare target=$1
 
-	# XXX TODO
-	return 1
+	xm migrate $OCF_RESKEY_name $target
+	return $?
 }
 
 #
 # A Resource group is abstract, but the OCF RA API doesn't allow for abstract
 # resources, so here it is.
 #
+
 case $1 in
 	start)
 		start



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cluster-devel] cluster/rgmanager/src/resources vm.sh
@ 2007-11-14 18:58 lhh
  0 siblings, 0 replies; 2+ messages in thread
From: lhh @ 2007-11-14 18:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	lhh at 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-14 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-14 18:58 [Cluster-devel] cluster/rgmanager/src/resources vm.sh lhh
  -- strict thread matches above, loose matches on Subject: below --
2007-06-22 16:59 lhh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).