This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 869557 - Can't add more than 256 logical networks
Can't add more than 256 logical networks
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
urgent Severity urgent
: rc
: ---
Assigned To: Michal Privoznik
Virtualization Bugs
network scale
: ZStream
Depends On:
Blocks: 869650
  Show dependency treegraph
 
Reported: 2012-10-24 04:54 EDT by Meni Yakove
Modified: 2013-02-21 02:10 EST (History)
19 users (show)

See Also:
Fixed In Version: libvirt-0.10.2-1.el6
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:10:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
vdsm.log (1.52 MB, text/x-log)
2012-10-24 04:54 EDT, Meni Yakove
no flags Details

  None (edit)
Description Meni Yakove 2012-10-24 04:54:26 EDT
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 1 Antoni Segura Puimedon 2012-10-24 04:59:52 EDT
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.
Comment 7 Jiri Denemark 2012-10-24 08:19:12 EDT
Fixed by v0.9.12-146-geb635de taken in when we rebased to 0.10.2:

commit eb635de1fed3257c5c62b552d1ec981c9545c1d7
Author: Michal Privoznik <mprivozn@redhat.com>
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.
Comment 10 Rami Vaknin 2012-10-26 15:24:13 EDT
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
Comment 11 errata-xmlrpc 2013-02-21 02:10:59 EST
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

Note You need to log in before you can comment on or make changes to this bug.