incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1085563 - in /incubator/tashi/branches/stablefix: etc/TashiDefaults.cfg src/tashi/nodemanager/vmcontrol/qemu.py
Date Fri, 25 Mar 2011 21:25:19 GMT
Author: stroucki
Date: Fri Mar 25 21:25:19 2011
New Revision: 1085563

URL: http://svn.apache.org/viewvc?rev=1085563&view=rev
Log:
TashiDefaults.cfg: Add parameter Qemu/scratchDir to specify directory for temporary files
created by Qemu (like copy on write disk images)
qemu.py: Add support to specify temporary directory for temporary files created by Qemu

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

Modified: incubator/tashi/branches/stablefix/etc/TashiDefaults.cfg
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stablefix/etc/TashiDefaults.cfg?rev=1085563&r1=1085562&r2=1085563&view=diff
==============================================================================
--- incubator/tashi/branches/stablefix/etc/TashiDefaults.cfg (original)
+++ incubator/tashi/branches/stablefix/etc/TashiDefaults.cfg Fri Mar 25 21:25:19 2011
@@ -107,6 +107,7 @@ statsInterval = 0.0
 [Qemu]
 qemuBin = /usr/local/bin/qemu-system-x86_64
 infoDir = /var/tmp/VmControlQemu/
+scratchDir = /tmp
 pollDelay = 1.0
 migrationRetries = 10
 monitorTimeout = 60.0

Modified: incubator/tashi/branches/stablefix/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stablefix/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1085563&r1=1085562&r2=1085563&view=diff
==============================================================================
--- incubator/tashi/branches/stablefix/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/branches/stablefix/src/tashi/nodemanager/vmcontrol/qemu.py Fri Mar 25
21:25:19 2011
@@ -102,6 +102,10 @@ class Qemu(VmControlInterface):
 		self.consolePortLock = threading.Lock()
 		self.migrationSemaphore = threading.Semaphore(int(self.config.get("Qemu", "maxParallelMigrations")))
 		self.stats = {}
+		self.scratchDir = self.config.get("Qemu", "scratchDir")
+		if len(self.scratchDir) == 0:
+			self.scratchDir = "/tmp"
+
 		try:
 			os.mkdir(self.INFO_DIR)
 		except:
@@ -315,7 +319,6 @@ class Qemu(VmControlInterface):
 	def startVm(self, instance, source):
 		"""Universal function to start a VM -- used by instantiateVM, resumeVM, and prepReceiveVM"""
 
-		
 		#  Capture startVm Hints
 		#  CPU hints
 		cpuModel = instance.hints.get("cpumodel")
@@ -393,6 +396,8 @@ class Qemu(VmControlInterface):
 					os.close(i)
 				except:
 					pass
+			# XXXstroucki unfortunately no kvm option yet
+			os.environ['TMPDIR'] = self.scratchDir
 			os.execl(self.QEMU_BIN, *cmd)
 			sys.exit(-1)
 		os.close(pipe_w)



Mime
View raw message