incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1301160 - in /incubator/tashi/branches/stable: ./ src/tashi/clustermanager/clustermanagerservice.py src/tashi/nodemanager/vmcontrol/qemu.py src/tashi/util.py
Date Thu, 15 Mar 2012 19:24:09 GMT
Author: stroucki
Date: Thu Mar 15 19:24:09 2012
New Revision: 1301160

URL: http://svn.apache.org/viewvc?rev=1301160&view=rev
Log:
Import fixes <= r1301156 from trunk

Modified:
    incubator/tashi/branches/stable/   (props changed)
    incubator/tashi/branches/stable/src/tashi/clustermanager/clustermanagerservice.py
    incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py
    incubator/tashi/branches/stable/src/tashi/util.py

Propchange: incubator/tashi/branches/stable/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 15 19:24:09 2012
@@ -10,4 +10,4 @@
 /incubator/tashi/branches/stroucki-tashi2:1294935-1294944
 /incubator/tashi/branches/stroucki-tashi8:1294393-1294427
 /incubator/tashi/branches/zoni-dev/trunk:1034098-1177646
-/incubator/tashi/trunk:1203846-1298109
+/incubator/tashi/trunk:1203846-1298109,1301133-1301134,1301156

Modified: incubator/tashi/branches/stable/src/tashi/clustermanager/clustermanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stable/src/tashi/clustermanager/clustermanagerservice.py?rev=1301160&r1=1301159&r2=1301160&view=diff
==============================================================================
--- incubator/tashi/branches/stable/src/tashi/clustermanager/clustermanagerservice.py (original)
+++ incubator/tashi/branches/stable/src/tashi/clustermanager/clustermanagerservice.py Thu
Mar 15 19:24:09 2012
@@ -271,7 +271,12 @@ class ClusterManagerService(object):
 		for instanceId in self.instanceLastContactTime.keys():
 
 			# XXXstroucki should lock instance here?
-			if (self.instanceLastContactTime[instanceId] < (self.__now() - self.allowDecayed)):
+			try:
+				lastContactTime = self.instanceLastContactTime[instanceId]
+			except KeyError:
+				continue
+
+			if (lastContactTime < (self.__now() - self.allowDecayed)):
 				try:
 					instance = self.data.acquireInstance(instanceId)
 					# Don't query non-running VMs. eg. if a VM
@@ -382,7 +387,7 @@ class ClusterManagerService(object):
 						self.proxy[hostname].destroyVm(instance.vmId)
 						self.data.releaseInstance(instance)
 				except:
-					self.log.exception('destroyVm failed on host %s vmId %s' % (hostname, str(instance.vmId)))
+					self.log.warning('destroyVm failed on host %s vmId %s' % (hostname, str(instance.vmId)))
 					self.data.removeInstance(instance)
 
 

Modified: incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1301160&r1=1301159&r2=1301160&view=diff
==============================================================================
--- incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py Thu Mar 15 19:24:09
2012
@@ -134,7 +134,7 @@ class Qemu(VmControlInterface):
 		pids = []
 		real_bin = self.QEMU_BIN
 		while os.path.islink(real_bin):
-			real_bin = os.readlink(self.QEMU_BIN)
+			real_bin = os.readlink(real_bin)
 
 		for f in os.listdir("/proc"):
 			try:

Modified: incubator/tashi/branches/stable/src/tashi/util.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stable/src/tashi/util.py?rev=1301160&r1=1301159&r2=1301160&view=diff
==============================================================================
--- incubator/tashi/branches/stable/src/tashi/util.py (original)
+++ incubator/tashi/branches/stable/src/tashi/util.py Thu Mar 15 19:24:09 2012
@@ -222,6 +222,7 @@ def __getShellFn():
 def debugConsole(globalDict):
 	"""A debugging console that optionally uses pysh"""
 	def realDebugConsole(globalDict):
+		import os
 		try :
 			import atexit
 			(calltype, shellfn) = __getShellFn()
@@ -247,7 +248,6 @@ def debugConsole(globalDict):
 				except Exception, e:
 					sys.stdout.write(str(e) + "\n")
 
-		import os
 		os._exit(0)
 
 	if (os.getenv("DEBUG", "0") == "1"):



Mime
View raw message