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 881480 - virDomainUpdateDeviceFlags fails when interface type is 'network'
Summary: virDomainUpdateDeviceFlags fails when interface type is 'network'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 886216
TreeView+ depends on / blocked
 
Reported: 2012-11-29 00:14 UTC by Antoni Segura Puimedon
Modified: 2014-12-08 00:50 UTC (History)
12 users (show)

Fixed In Version: libvirt-0.10.2-11.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 07:27:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
script that executes the steps that reproduce the issue. (3.65 KB, application/x-shellscript)
2012-11-29 00:14 UTC, Antoni Segura Puimedon
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 Antoni Segura Puimedon 2012-11-29 00:14:53 UTC
Created attachment 653838 [details]
script that executes the steps that reproduce the issue.

Description of problem:
When two host bridges are defined and mapped as libvirt networks and a vnic
with interface of type 'network', moving the source from one network to another
using virDomainUpdateDeviceFlags fails.

Version-Release number of selected component (if applicable):
libvirt-0.10.2-7.el6.x86_64

How reproducible: 100%


Steps to Reproduce:
Use attached bash script (requires python and libvirt python bindings).
  
Actual results:
libvirtError: this function is not supported by the connection driver: unable to change config on 'network' network type

Expected results:
vnet4 is part of bridge bar instead of bridge foo.

Additional info:
This refers to a feature found in: https://bugzilla.redhat.com/show_bug.cgi?id=805071

Comment 3 Laine Stump 2012-12-03 19:06:23 UTC
Fix pushed to upstream libvirt:

commit 3738cf41f1012eca419e8fa0fa0575cb1e0552e3
Author: Laine Stump <laine>
Date:   Mon Dec 3 12:24:46 2012 -0500

    conf: fix virDomainNetGetActualDirect*() and BridgeName()
    
    This resolves:
    
       https://bugzilla.redhat.com/show_bug.cgi?id=881480
    
    These three functions:
    
      virDomainNetGetActualBridgeName
      virDomainNetGetActualDirectDev
      virDomainNetGetActualDirectMode
    
    return attributes that are in a union whose contents are interpreted
    differently depending on the actual->type and so they should only
    return non-0 when actual->type is 'bridge' (in the first case) or
    'direct' (in the other two cases, but I had neglected to do that, so
    ...DirectDev() was returning bridge.brname (which happens to share the
    same spot in the union with direct.linkdev) if actual->type was
    'bridge', and ...BridgeName was returning direct.linkdev when
    actual->type was 'direct'.
    
    How does this involve Bug 881480 (which was about the inability to
    switch between two networks that both have "<forward mode='bridge'/>
    <bridge name='xxx'/>"? Whenever the return value of
    virDomainNetGetActualDirectDev() for the new and old network
    definitions doesn't match, qemuDomainChangeNet() requires a "complete
    reconnect" of the device, which qemu currently doesn't
    support. ...DirectDev() *should* have been returning NULL for old and
    new, but was instead returning the old and new bridge names, which
    differ.
    
    (The other two functions weren't causing any behavioral problems in
    virDomainChangeNet(), but their problem and fix was identical, so I
    included them in this same patch).

Comment 7 yanbing du 2012-12-10 03:15:02 UTC
# rpm -q libvirt
libvirt-0.10.2-11.el6.x86_64

# sh libvirt_updateDevice.sh 
Network foo created from foo.xml

Network bar created from bar.xml

512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 0.373643 s, 1.4 GB/s
Domain foobar created from vm.xml

This should show vnet4 in foo bridge
bridge name	bridge id		STP enabled	interfaces
bar		8000.000000000000	no		
foo		8000.fe5400a2b450	no		vnet0
0
This should show vnet4 in bar bridge
bridge name	bridge id		STP enabled	interfaces
bar		8000.fe5400a2b450	no		vnet0
foo		8000.000000000000	no		
Cleaning up
Domain foobar destroyed

Network foo destroyed

Network bar destroyed
--------------------------

The result is correct(vnet0 change from bridge foo to bar).

But one more question is, there's an error in libvirtd.log when running the reproducing script, so need your confirm.

# tail -f  /var/log/libvirt/libvirtd.log 
2012-12-07 07:13:26.523+0000: 6311: warning : virCgroupMoveTask:885 : no vm cgroup in controller 3
2012-12-07 07:13:26.523+0000: 6311: warning : virCgroupMoveTask:885 : no vm cgroup in controller 4
2012-12-07 07:13:26.523+0000: 6311: warning : virCgroupMoveTask:885 : no vm cgroup in controller 6
2012-12-07 07:13:26.623+0000: 6314: error : qemuDomainNetGetBridgeName:1277 : internal error Network type 6 is not supported
2012-12-07 07:13:26.623+0000: 6314: error : qemuDomainNetGetBridgeName:1277 : internal error Network type 6 is not supported

Thanks!

Comment 8 Laine Stump 2012-12-10 17:46:52 UTC
Yes, that is a problem with an error message being logged in a non-error situation.

I just posted a fix upstream:

https://www.redhat.com/archives/libvir-list/2012-December/msg00431.html

Comment 9 Laine Stump 2012-12-10 18:47:57 UTC
I filed Bug 885838 for the extra log message. In the meantime the operation does complete successfully, so this bug can be moved to VERIFY.

Comment 10 yanbing du 2012-12-11 02:18:38 UTC
(In reply to comment #9)
> I filed Bug 885838 for the extra log message. In the meantime the operation
> does complete successfully, so this bug can be moved to VERIFY.

OK, thanks. I will move this bug to VERIFY.

Comment 11 errata-xmlrpc 2013-02-21 07:27:52 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.