incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mry...@apache.org
Subject svn commit: r761801 - in /incubator/tashi/trunk: etc/TashiDefaults.cfg src/tashi/nodemanager/vmcontrol/qemu.py
Date Fri, 03 Apr 2009 21:16:42 GMT
Author: mryan3
Date: Fri Apr  3 21:16:42 2009
New Revision: 761801

URL: http://svn.apache.org/viewvc?rev=761801&view=rev
Log:
Added the "useMigrateArgument" option to allow using test software for live-migrating disk
images


Modified:
    incubator/tashi/trunk/etc/TashiDefaults.cfg
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py

Modified: incubator/tashi/trunk/etc/TashiDefaults.cfg
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/etc/TashiDefaults.cfg?rev=761801&r1=761800&r2=761801&view=diff
==============================================================================
--- incubator/tashi/trunk/etc/TashiDefaults.cfg (original)
+++ incubator/tashi/trunk/etc/TashiDefaults.cfg Fri Apr  3 21:16:42 2009
@@ -73,6 +73,7 @@
 monitorTimeout = 60.0
 migrateTimeout = 300.0
 maxParallelMigrations = 10
+useMigrateArgument = False
 
 [XenPV]
 vmNamePrefix = tashi

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=761801&r1=761800&r2=761801&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Fri Apr  3 21:16:42 2009
@@ -28,7 +28,7 @@
 import time
 
 from tashi.services.ttypes import *
-from tashi.util import broken, logged, scrubString
+from tashi.util import broken, logged, scrubString, boolean
 from vmcontrolinterface import VmControlInterface
 
 log = logging.getLogger(__file__)
@@ -90,6 +90,7 @@
 		self.migrationRetries = int(self.config.get("Qemu", "migrationRetries"))
 		self.monitorTimeout = float(self.config.get("Qemu", "monitorTimeout"))
 		self.migrateTimeout = float(self.config.get("Qemu", "migrateTimeout"))
+		self.useMigrateArgument = boolean(self.config.get("Qemu", "useMigrateArgument"))
 		self.controlledVMs = {}
 		self.usedPorts = []
 		self.usedPortsLock = threading.Lock()
@@ -294,9 +295,14 @@
 			imageLocal = self.dfs.getLocalHandle("images/" + uri)
 			if (disk.persistent):
 				snapshot = "off"
+				migrate = "off"
 			else:
 				snapshot = "on"
-			diskString = diskString + "-drive file=%s,if=%s,index=%d,snapshot=%s,media=disk " % (imageLocal,
diskInterface, index, snapshot)
+				migrate = "on"
+			if (self.useMigrateArgument):
+				diskString = diskString + "-drive file=%s,if=%s,index=%d,snapshot=%s,migrate=%s,media=disk
" % (imageLocal, diskInterface, index, snapshot, migrate)
+			else:
+				diskString = diskString + "-drive file=%s,if=%s,index=%d,snapshot=%s,media=disk " % (imageLocal,
diskInterface, index, snapshot)
 		nicModel = instance.hints.get("nicModel", "e1000")
 		nicString = ""
 		for nic in instance.nics:



Mime
View raw message