incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strou...@apache.org
Subject svn commit: r1187738 - in /incubator/tashi/trunk/src/tashi: clustermanager/clustermanager.py nodemanager/nodemanager.py nodemanager/vmcontrol/qemu.py
Date Sat, 22 Oct 2011 17:46:45 GMT
Author: stroucki
Date: Sat Oct 22 17:46:45 2011
New Revision: 1187738

URL: http://svn.apache.org/viewvc?rev=1187738&view=rev
Log:
CM/NM: t.logging is a python Logger object, which does not have a flag "quiet".
I don't know whether the previous version of rpyc was looking for this, but
now it does full annoying logging. Use python Logger methods to shut it up.
(this time in the right branch)
qemu.py: Back off 512 KB of main memory

Modified:
    incubator/tashi/trunk/src/tashi/clustermanager/clustermanager.py
    incubator/tashi/trunk/src/tashi/nodemanager/nodemanager.py
    incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py

Modified: incubator/tashi/trunk/src/tashi/clustermanager/clustermanager.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/clustermanager/clustermanager.py?rev=1187738&r1=1187737&r2=1187738&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/clustermanager/clustermanager.py (original)
+++ incubator/tashi/trunk/src/tashi/clustermanager/clustermanager.py Sat Oct 22 17:46:45 2011
@@ -51,7 +51,7 @@ def startClusterManager(config):
 		t = ThreadedServer(service=rpycservices.ManagerService, hostname='0.0.0.0', port=int(config.get('ClusterManagerService',
'port')), auto_register=False, authenticator=authenticator)
 	else:
 		t = ThreadedServer(service=rpycservices.ManagerService, hostname='0.0.0.0', port=int(config.get('ClusterManagerService',
'port')), auto_register=False)
-	t.logger.quiet = True
+	t.logger.setLevel(logging.ERROR)
 	t.service.service = service
 	t.service._type = 'ClusterManagerService'
 

Modified: incubator/tashi/trunk/src/tashi/nodemanager/nodemanager.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/nodemanager.py?rev=1187738&r1=1187737&r2=1187738&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/nodemanager.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/nodemanager.py Sat Oct 22 17:46:45 2011
@@ -55,7 +55,7 @@ def main():
 		t = ThreadedServer(service=rpycservices.ManagerService, hostname='0.0.0.0', port=int(config.get('NodeManagerService',
'port')), auto_register=False, authenticator=authenticator)
 	else:
 		t = ThreadedServer(service=rpycservices.ManagerService, hostname='0.0.0.0', port=int(config.get('NodeManagerService',
'port')), auto_register=False)
-	t.logger.quiet = True
+	t.logger.setLevel(logging.ERROR)
 	t.service.service = service
 	t.service._type = 'NodeManagerService'
 

Modified: incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py
URL: http://svn.apache.org/viewvc/incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py?rev=1187738&r1=1187737&r2=1187738&view=diff
==============================================================================
--- incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py (original)
+++ incubator/tashi/trunk/src/tashi/nodemanager/vmcontrol/qemu.py Sat Oct 22 17:46:45 2011
@@ -339,7 +339,8 @@ class Qemu(VmControlInterface):
 		cmd = "head -n 1 /proc/meminfo"		
 		memoryStr = subprocess.Popen(cmd.split(), executable=cmd.split()[0], stdout=subprocess.PIPE).stdout.read().strip().split()
 		if (memoryStr[2] == "kB"):
-			host.memory = int(memoryStr[1])/1024
+			# XXXstroucki should have parameter for reserved mem
+			host.memory = (int(memoryStr[1])/1024) - 512
 		else:
 			log.warning('Unable to determine amount of physical memory - reporting 0')
 			host.memory = 0



Mime
View raw message