incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mry...@apache.org
Subject svn commit: r818201 - /incubator/tashi/trunk/src/tashi/agents/primitive.py
Date Wed, 23 Sep 2009 18:53:04 GMT
Author: mryan3
Date: Wed Sep 23 18:53:04 2009
New Revision: 818201

URL: http://svn.apache.org/viewvc?rev=818201&view=rev
Log:
Added some code to make the scheduler only complain once if it can't find a place to put a
VM


Modified:
    incubator/tashi/trunk/src/tashi/agents/primitive.py

Modified: incubator/tashi/trunk/src/tashi/agents/primitive.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/agents/primitive.py?rev=818201&r1=818200&r2=818201&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/agents/primitive.py (original)
+++ incubator/tashi/trunk/src/tashi/agents/primitive.py Wed Sep 23 18:53:04 2009
@@ -50,6 +50,7 @@
 	
 	def start(self):
 		oldInstances = {}
+		muffle = {}
 		while True:
 			try:
 				# Generate a list of VMs/host
@@ -109,8 +110,11 @@
 								self.log.info("Scheduling instance %s (%d mem, %d cores, %d uid) on host %s" % (inst.name,
inst.memory, inst.cores, inst.userId, minMaxHost.name))	
 								self.client.activateVm(i, minMaxHost)
 								load[minMaxHost.id] = load[minMaxHost.id] + [i]
+								muffle.clear()
 							else:
-								self.log.info("Failed to find a suitable place to schedule %s" % (inst.name))
+								if (inst.name not in muffle):
+									self.log.info("Failed to find a suitable place to schedule %s" % (inst.name))
+									muffle[inst.name] = True
 						except Exception, e:
 							self.log.exception("Failed to schedule or activate %s" % (inst.name))
 				time.sleep(self.scheduleDelay)



Mime
View raw message