WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] Re: set_memory_dynamic_max_live causes int overflow

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] Re: set_memory_dynamic_max_live causes int overflow
From: weiming <zephyr.zhao@xxxxxxxxx>
Date: Tue, 19 Feb 2008 10:54:53 -0500
Delivery-date: Tue, 19 Feb 2008 07:55:07 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=4zFT8VjiuERZRPnR7X7kF64gUGBbnC+R4VZMqh1GAPE=; b=YDX3qUOA00aLVG8MKkz6cmAz/34Hhl/SAFCVSDXvjA5pMiNaUPN/6OFXgyZQIg2Dj3fK2y+ol0pxM0zSLZ5X9YFAv3agSYqfNvoo7iXpzGhwL06LwxTYtCC2i/HCp2NUI/yqVnFBjp9WqV09Zt9uViIR/NIYsLUbLhFoWJdf6ws=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <add59a3f0802171352l10cfef14j49d2a759e5e933d8@xxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <add59a3f0802171352l10cfef14j49d2a759e5e933d8@xxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>