incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1365876 - in /incubator/tashi/branches/stable: ./ src/tashi/clustermanager/clustermanagerservice.py src/tashi/nodemanager/vmcontrol/qemu.py src/tashi/utils/timeout.py
Date Thu, 26 Jul 2012 03:47:50 GMT
Author: stroucki
Date: Thu Jul 26 03:47:50 2012
New Revision: 1365876

URL: http://svn.apache.org/viewvc?rev=1365876&view=rev
Log:
Merge non-new-features changes into stable branch

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/utils/timeout.py

Propchange: incubator/tashi/branches/stable/
------------------------------------------------------------------------------
  Merged /incubator/tashi/trunk:r1363566-1363568

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=1365876&r1=1365875&r2=1365876&view=diff
==============================================================================
--- incubator/tashi/branches/stable/src/tashi/clustermanager/clustermanagerservice.py (original)
+++ incubator/tashi/branches/stable/src/tashi/clustermanager/clustermanagerservice.py Thu
Jul 26 03:47:50 2012
@@ -461,6 +461,8 @@ class ClusterManagerService(object):
 			raise
 
 		try:
+			# XXXstroucki: if migration fails, we'll still
+			# show MigratePrep as state...
 			self.__stateTransition(instance, InstanceState.Running, InstanceState.MigratePrep)
 		except TashiException:
 			self.data.releaseInstance(instance)
@@ -476,6 +478,7 @@ class ClusterManagerService(object):
 		except Exception:
 			self.log.exception('prepReceiveVm failed')
 			raise
+
 		instance = self.data.acquireInstance(instance.id)
 		try:
 			self.__stateTransition(instance, InstanceState.MigratePrep, InstanceState.MigrateTrans)

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=1365876&r1=1365875&r2=1365876&view=diff
==============================================================================
--- incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/branches/stable/src/tashi/nodemanager/vmcontrol/qemu.py Thu Jul 26 03:47:50
2012
@@ -728,7 +728,8 @@ class Qemu(VmControlInterface):
 
 	def __checkPortListening(self, port):
 		# XXXpipe: find whether something is listening yet on the port
-		(stdin, stdout) = os.popen2("netstat -ln | grep 0.0.0.0:%d | wc -l" % (port))
+		p = subprocess.Popen("netstat -ln | grep 0.0.0.0:%d | wc -l" % (port), shell = True, stdin
= PIPE, stdout = PIPE, close_fds = True)
+		(stdin, stdout) = (p.stdin, p.stdout)
 		stdin.close()
 		r = stdout.read()
 		lc = int(r.strip())

Modified: incubator/tashi/branches/stable/src/tashi/utils/timeout.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stable/src/tashi/utils/timeout.py?rev=1365876&r1=1365875&r2=1365876&view=diff
==============================================================================
--- incubator/tashi/branches/stable/src/tashi/utils/timeout.py (original)
+++ incubator/tashi/branches/stable/src/tashi/utils/timeout.py Thu Jul 26 03:47:50 2012
@@ -50,7 +50,7 @@ class TimeoutThread:
 		if finished:
 			return rval
 		else: # NOTE: timeout must be set for this to be true.
-			raise TimeoutException("function %s timed out after %f seconds" % (str(self.function),
timeout))
+			raise TimeoutException("function %s timed out after %.2f seconds" % (str(self.function),
timeout))
 
 	def run(self):
 		try:



Mime
View raw message