Previously, the fixed limit for the maximum size of an RPC message that could be supplied to the libvirtd daemon (65536 bytes) was not always sufficient. Consequently, messages that were longer than that could be dropped, leaving a client unable to fetch important data. With this update, the buffer for incoming messages has been made dynamic and libvirtd now allocates as much memory as is needed for a given message, thus allowing to send much bigger messages.
Created attachment 632622[details]
vdsm.log
Description of problem:
libvirt version < 0.9.13 limit the network number to 256, If we add more then 256 networks libvirt return:
virsh -r net-list
error: Failed to list active networks
error: too many remote undefineds: 257 > 256
error: Reconnected to the hypervisor
and VDSM fails to report vdsCaps:
vdsClient -s 0 getVdsCaps
Unexpected exception
Version-Release number of selected component (if applicable):
vdsm-4.9.6-38.0.el6_3.x86_64
libvirt-0.9.10-21.el6_3.5.x86_64
How reproducible:
100%
Steps to Reproduce:
1.Create 260 networks and attache them to the host.
Actual results:
libvirt limit networks to 256 and VDSM non responsive.
Expected results:
Should be able to create more then 256 networks on libvirt and VDSM should be responsive even if libvirt fail.
Additional info:
Thread-3620::ERROR::2012-10-23 17:14:12,590::BindingXMLRPC::883::vds::(wrapper) libvirt error
Traceback (most recent call last):
File "/usr/share/vdsm/BindingXMLRPC.py", line 879, in wrapper
res = f(*args, **kwargs)
File "/usr/share/vdsm/BindingXMLRPC.py", line 288, in getCapabilities
ret = api.getCapabilities()
File "/usr/share/vdsm/API.py", line 1039, in getCapabilities
c = caps.get()
File "/usr/share/vdsm/caps.py", line 247, in get
caps.update(netinfo.get())
File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 249, in get
nets = networks()
File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 72, in networks
for name in conn.listNetworks():
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 3240, in listNetworks
messages. Failure to do so may result in connections being closed
libvirtError: Cannot write data: Broken pipe
Thread-3621::ERROR::2012-10-23 17:14:13,093::BindingXMLRPC::883::vds::(wrapper) libvirt error
Traceback (most recent call last):
File "/usr/share/vdsm/BindingXMLRPC.py", line 879, in wrapper
res = f(*args, **kwargs)
File "/usr/share/vdsm/BindingXMLRPC.py", line 288, in getCapabilities
ret = api.getCapabilities()
File "/usr/share/vdsm/API.py", line 1039, in getCapabilities
c = caps.get()
File "/usr/share/vdsm/caps.py", line 247, in get
caps.update(netinfo.get())
File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 249, in get
nets = networks()
File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 72, in networks
for name in conn.listNetworks():
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 3240, in listNetworks
messages. Failure to do so may result in connections being closed
libvirtError: Cannot write data: Broken pipe
Comment 1Antoni Segura Puimedon
2012-10-24 08:59:52 UTC
The libvirt patch that lifts this arbitrary limit is:
eb635de - rpc: Size up RPC limits — Michal Privoznik
And it is included in libvirt 0.9.13. Thus, to fix this bug, we shall move the required libvirt version to >=0.9.13.
Fixed by v0.9.12-146-geb635de taken in when we rebased to 0.10.2:
commit eb635de1fed3257c5c62b552d1ec981c9545c1d7
Author: Michal Privoznik <mprivozn>
Date: Fri Apr 27 14:49:48 2012 +0200
rpc: Size up RPC limits
Since we are allocating RPC buffer dynamically, we can increase limits
for max. size of RPC message and RPC string. This is needed to cover
some corner cases where libvirt is run on such huge machines that their
capabilities XML is 4 times bigger than our current limit. This leaves
users with inability to even connect.
Verified.
I reproduced this bug on RHEL6.3 with libvirt-0.9.10-21.el6_3.5.x86_64, then I've updated libvirt to libvirt-0.10.2-1.el6.x86_64, and I was able to attach much more than 256 vlan networks to host's nic:
At the moment:
# virsh -r net-list | wc -l
763
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2013-0276.html
Created attachment 632622 [details] vdsm.log Description of problem: libvirt version < 0.9.13 limit the network number to 256, If we add more then 256 networks libvirt return: virsh -r net-list error: Failed to list active networks error: too many remote undefineds: 257 > 256 error: Reconnected to the hypervisor and VDSM fails to report vdsCaps: vdsClient -s 0 getVdsCaps Unexpected exception Version-Release number of selected component (if applicable): vdsm-4.9.6-38.0.el6_3.x86_64 libvirt-0.9.10-21.el6_3.5.x86_64 How reproducible: 100% Steps to Reproduce: 1.Create 260 networks and attache them to the host. Actual results: libvirt limit networks to 256 and VDSM non responsive. Expected results: Should be able to create more then 256 networks on libvirt and VDSM should be responsive even if libvirt fail. Additional info: Thread-3620::ERROR::2012-10-23 17:14:12,590::BindingXMLRPC::883::vds::(wrapper) libvirt error Traceback (most recent call last): File "/usr/share/vdsm/BindingXMLRPC.py", line 879, in wrapper res = f(*args, **kwargs) File "/usr/share/vdsm/BindingXMLRPC.py", line 288, in getCapabilities ret = api.getCapabilities() File "/usr/share/vdsm/API.py", line 1039, in getCapabilities c = caps.get() File "/usr/share/vdsm/caps.py", line 247, in get caps.update(netinfo.get()) File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 249, in get nets = networks() File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 72, in networks for name in conn.listNetworks(): File "/usr/lib64/python2.6/site-packages/libvirt.py", line 3240, in listNetworks messages. Failure to do so may result in connections being closed libvirtError: Cannot write data: Broken pipe Thread-3621::ERROR::2012-10-23 17:14:13,093::BindingXMLRPC::883::vds::(wrapper) libvirt error Traceback (most recent call last): File "/usr/share/vdsm/BindingXMLRPC.py", line 879, in wrapper res = f(*args, **kwargs) File "/usr/share/vdsm/BindingXMLRPC.py", line 288, in getCapabilities ret = api.getCapabilities() File "/usr/share/vdsm/API.py", line 1039, in getCapabilities c = caps.get() File "/usr/share/vdsm/caps.py", line 247, in get caps.update(netinfo.get()) File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 249, in get nets = networks() File "/usr/lib64/python2.6/site-packages/vdsm/netinfo.py", line 72, in networks for name in conn.listNetworks(): File "/usr/lib64/python2.6/site-packages/libvirt.py", line 3240, in listNetworks messages. Failure to do so may result in connections being closed libvirtError: Cannot write data: Broken pipe