incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1244839 - in /incubator/tashi/branches/stroucki-slotsbug: ./ src/tashi/client/tashi-client.py
Date Thu, 16 Feb 2012 03:32:44 GMT
Author: stroucki
Date: Thu Feb 16 03:32:44 2012
New Revision: 1244839

URL: http://svn.apache.org/viewvc?rev=1244839&view=rev
Log:
tashi-client: test fix to calculate slots correctly if some hosts happen
              to be overprovisioned

Added:
    incubator/tashi/branches/stroucki-slotsbug/
      - copied from r1242468, incubator/tashi/trunk/
Modified:
    incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py

Modified: incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py
URL: http://svn.apache.org/viewvc/incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py?rev=1244839&r1=1242468&r2=1244839&view=diff
==============================================================================
--- incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py (original)
+++ incubator/tashi/branches/stroucki-slotsbug/src/tashi/client/tashi-client.py Thu Feb 16
03:32:44 2012
@@ -166,7 +166,7 @@ def getSlots(cores, memory):
 			continue
 		countbycores = int((h.cores - h.usedCores) / cores)
 		countbymemory = int((h.memory - h.usedMemory) / memory)
-		count += min(countbycores, countbymemory)
+		count += min(0, min(countbycores, countbymemory))
 
 	print "%d" % (count),
 	print (lambda:"instances", lambda:"instance")[count == 1](),



Mime
View raw message