incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1084226 - /incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py
Date Tue, 22 Mar 2011 15:53:08 GMT
Author: stroucki
Date: Tue Mar 22 15:53:07 2011
New Revision: 1084226

URL: http://svn.apache.org/viewvc?rev=1084226&view=rev
Log:
Getting a connection to the CM may fail, so put that in the try.

Modified:
    incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py

Modified: incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py?rev=1084226&r1=1084225&r2=1084226&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/nodemanagerservice.py Tue Mar 22 15:53:07
2011
@@ -89,7 +89,6 @@ class NodeManagerService(object):
 			self.log.exception('Failed to save VM info to %s' % (self.infoFile))
 	
 	def vmStateChange(self, vmId, old, cur):
-		cm = ConnectionManager(self.username, self.password, self.cmPort)[self.cmHost]
 		instance = self.getInstance(vmId)
 		if (old and instance.state != old):
 			self.log.warning('VM state was %s, call indicated %s' % (vmStates[instance.state], vmStates[old]))
@@ -99,6 +98,7 @@ class NodeManagerService(object):
 		newInst = Instance(d={'state':cur})
 		success = lambda: None
 		try:
+			cm = ConnectionManager(self.username, self.password, self.cmPort)[self.cmHost]
 			cm.vmUpdate(instance.id, newInst, old)
 		except Exception, e:
 			self.log.exception('RPC failed for vmUpdate on CM')



Mime
View raw message