qmemman: limit domain memory to 2G to workaround for xen xml-rpc limitation

File "/usr/lib64/python2.6/xmlrpclib.py", line 710, in dump_int
    raise OverflowError, "int exceeds XML-RPC limits"
OverflowError: int exceeds XML-RPC limits
How crappy.
This commit is contained in:
Rafal Wojtczuk 2010-08-31 16:19:01 +02:00
parent de2619fbed
commit c66e0848f3

View File

@ -104,6 +104,9 @@ class SystemState:
def mem_set(self, id, val): def mem_set(self, id, val):
uuid = self.domdict[id].uuid uuid = self.domdict[id].uuid
if val >= 2**31:
print 'limiting memory from ', val, 'to maxint because of xml-rpc lameness'
val = 2**31 - 1
print 'mem-set domain', id, 'to', val print 'mem-set domain', id, 'to', val
try: try:
self.xend_session.session.xenapi.VM.set_memory_dynamic_max_live(uuid, val) self.xend_session.session.xenapi.VM.set_memory_dynamic_max_live(uuid, val)