RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 869557 - Can't add more than 256 logical networks
Summary: Can't add more than 256 logical networks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard: network scale
Depends On:
Blocks: 869650
TreeView+ depends on / blocked
 
Reported: 2012-10-24 08:54 UTC by Meni Yakove
Modified: 2013-02-21 07:10 UTC (History)
19 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-02-21 07:10:59 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Meni Yakove 2012-10-24 08:54:26 UTC
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 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.

Comment 7 Jiri Denemark 2012-10-24 12:19:12 UTC
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.

Comment 10 Rami Vaknin 2012-10-26 19:24:13 UTC
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 07:10:59 UTC
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.