[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] Re: set_memory_dynamic_max_live causes int overflow


  • To: xen-api@xxxxxxxxxxxxxxxxxxx
  • From: weiming <zephyr.zhao@xxxxxxxxx>
  • Date: Tue, 19 Feb 2008 10:54:53 -0500
  • Delivery-date: Tue, 19 Feb 2008 07:55:07 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=HrrTlRqPqdS0PCpnvBkzkiF+BWQdLKe42BfK1UmnEqLjpXxnWlJTil9ZMQ4q6znn6mWDPCSRTNoOYhZwoS3smbiK4HjS+HZeGKVdADTDrYICIeUqDiZ749N+/tfKjnObvUw7By3kuw9S1Y/P+m5Z1C3BuOngFOdl8Kaeye/TMkY=
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

Any ideas/updates? Thanks

---------- Forwarded message ----------
From: weiming <zephyr.zhao@xxxxxxxxx>
Date: Feb 17, 2008 4:52 PM
Subject: set_memory_dynamic_max_live causes int overflow
To: xen-api@xxxxxxxxxxxxxxxxxxx


Hi,

In my script, I use
void set_memory_dynamic_max_live (session_id s, VM ref self, int max)
to set the dynamic memory of a domain.

However, if the target memory size is large, for example, 3.5G (3670016000 bytes), it gives the following error.

Traceback (most recent call last):
  File "./myscript.py", line 482, in <module>
    main()
  File "./myscript.py", line 446, in main
    Dom0.setMemory(DOM0_RESERVE)
  File "./myscript.py", line 223, in setMemory
    self.server.xenapi.VM.set_memory_dynamic_max_live(self.uuid,size_bytes)
  File "/common/xen-build/xen-3.2.0/dist/install/usr/lib64/python/xen/xm/XenAPI.py", line 213, in __call__
    return self.__send(self.__name, args)
  File "/common/xen-build/xen-3.2.0/dist/install/usr/lib64/python/xen/xm/XenAPI.py", line 141, in xenapi_request
    result = _parse_result(getattr(self, methodname)(*full_params))
  File "/usr/lib64/python2.5/xmlrpclib.py", line 1150, in __call__
    return self.__send(self.__name, args)
  File "/common/xen-build/xen-3.2.0/dist/install/usr/lib64/python/xen/util/xmlrpcclient.py", line 118, in __request
    response = xmlrpclib.ServerProxy.__request(self, methodname, params)
  File "/usr/lib64/python2.5/xmlrpclib.py", line 1434, in __request
    allow_none=self.__allow_none)
  File "/usr/lib64/python2.5/xmlrpclib.py", line 1083, in dumps
    data = "">   File "/usr/lib64/python2.5/xmlrpclib.py", line 623, in dumps
    dump(v, write)
  File "/usr/lib64/python2.5/xmlrpclib.py", line 638, in __dump
    f(self, value, write)
  File "/usr/lib64/python2.5/xmlrpclib.py", line 664, in dump_long
    raise OverflowError, "long int exceeds XML-RPC limits"
OverflowError: long int exceeds XML-RPC limits

If I set the value as 1.5G (1572864000 bytes), it works fine.

Is there any way to deal with it?

btw, I using a 64bit dom0, python is also 64 bit.

Thanks,
Weiming


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.