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 1156367 - network using host bridge gets a MAC on libvirt update
Summary: network using host bridge gets a MAC on libvirt update
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-24 10:05 UTC by Luyao Huang
Modified: 2015-03-05 07:46 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.8-11.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:46:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Luyao Huang 2014-10-24 10:05:37 UTC
description of problem:
virtual network which using an existing host bridge will get a mac when update or downgrade libvirt

Version-Release number of selected component (if applicable):
libvirt-1.2.8-5.el7.x86_64


How reproducible:
100%

Steps to Reproduce:

1.# virsh net-dumpxml host-bridge
<network>
  <name>host-bridge</name>
  <uuid>3b251430-0eb4-4670-96e5-9ddd6d0bd90f</uuid>
  <forward mode='bridge'/>
  <bridge name='br14'/>
</network>

2.# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 host-bridge          inactive   no            yes

3.update libvirt from 1.2.8-4 to
libvirt-1.2.8-5.el7.x86_64

# yum update libvirt*

4.# virsh net-dumpxml host-bridge
<network>
  <name>host-bridge</name>
  <uuid>3b251430-0eb4-4670-96e5-9ddd6d0bd90f</uuid>
  <forward mode='bridge'/>
  <bridge name='br14'/>
  <mac address='52:54:00:5f:cb:9e'/>
</network>

5.# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 host-bridge          inactive   no            yes


Actual results:
host bridge type virtual network will get a mac when update or downgrade libvirt

Expected results:
do not get a mac

Additional info:

we cannot add a mac to this type network

# virsh net-edit host-bridge
error: unsupported configuration: Unsupported <mac> element in network host-bridge with forward mode='bridge'
Failed. Try again? [y,n,f,?]:

Test 1.1.1-29 update to 1.2.8-5 and also found the issue

Comment 1 Ján Tomko 2014-11-11 09:43:08 UTC
Upstream patches:
https://www.redhat.com/archives/libvir-list/2014-November/msg00309.html

Comment 2 Ján Tomko 2014-12-02 15:12:00 UTC
Now pushed upstream:
commit a47ae7c004e92f959b45808ca82326e8559c2f61
Author:     Ján Tomko <jtomko>
CommitDate: 2014-12-02 15:56:33 +0100

    Generate a MAC when loading a config instead of package update
    
    Partially reverts commit 5754dbd.
    
    The code in the specfile adds a MAC address to every <bridge>,
    even for <forward mode='bridge'> for which we don't support
    changing MAC addresses.
    
    Remove it completely. For new networks, we have been adding
    MAC addresses on definition/creation since the commit mentioned above.
    For existing networks (pre-0.9.0), the MAC is added by this commit.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1156367

commit c9c7a2bd964d02f1c1ffc542cb18bf851852dd37
Author:     Ján Tomko <jtomko>
CommitDate: 2014-12-02 15:56:29 +0100

    Silently ignore MAC in NetworkLoadConfig
    
    Libvirt's RPMs have been adding it to networks which don't support it.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1156367

git describe: v1.2.10-237-ga47ae7c

Comment 5 Hu Jianwei 2014-12-23 10:08:17 UTC
Verify as below:

[root@ibm-x3850x5-06 ~]# rpm -q libvirt
libvirt-1.2.8-10.el7.x86_64
[root@ibm-x3850x5-06 ~]# virsh net-dumpxml host-bridge
<network>
  <name>host-bridge</name>
  <uuid>0b90fed5-2ea9-4ff5-9728-95ef0116fdca</uuid>
  <forward mode='bridge'/>
  <bridge name='br14'/>
</network>

[root@ibm-x3850x5-06 ~]# 
[root@ibm-x3850x5-06 libvirt-1.2.8-11.el7]# rpm -Uvh *
Preparing...                          ################################# [100%]
Updating / installing...
   1:libvirt-client-1.2.8-11.el7      ################################# [  3%]
   2:libvirt-daemon-1.2.8-11.el7      ################################# [  5%]
   3:libvirt-daemon-driver-network-1.2################################# [  8%]
   4:libvirt-daemon-driver-nwfilter-1.################################# [ 10%]
   5:libvirt-daemon-driver-interface-1################################# [ 13%]
   6:libvirt-daemon-driver-nodedev-1.2################################# [ 15%]
   7:libvirt-daemon-driver-secret-1.2.################################# [ 18%]
   8:libvirt-daemon-driver-storage-1.2################################# [ 20%]
   9:libvirt-daemon-driver-lxc-1.2.8-1################################# [ 23%]
  10:libvirt-daemon-driver-qemu-1.2.8-################################# [ 25%]
  11:libvirt-daemon-config-nwfilter-1.################################# [ 28%]
  12:libvirt-daemon-config-network-1.2################################# [ 30%]
  13:libvirt-docs-1.2.8-11.el7        ################################# [ 33%]
  14:libvirt-devel-1.2.8-11.el7       ################################# [ 35%]
  15:libvirt-1.2.8-11.el7             ################################# [ 38%]
  16:libvirt-daemon-kvm-1.2.8-11.el7  ################################# [ 40%]
  17:libvirt-daemon-lxc-1.2.8-11.el7  ################################# [ 43%]
  18:libvirt-lock-sanlock-1.2.8-11.el7################################# [ 45%]
  19:libvirt-login-shell-1.2.8-11.el7 ################################# [ 48%]
  20:libvirt-debuginfo-1.2.8-11.el7   ################################# [ 50%]
Cleaning up / removing...
  21:libvirt-1.2.8-10.el7             ################################# [ 52%]
  22:libvirt-daemon-lxc-1.2.8-10.el7  ################################# [ 55%]
  23:libvirt-daemon-kvm-1.2.8-10.el7  ################################# [ 58%]
  24:libvirt-devel-1.2.8-10.el7       ################################# [ 60%]
  25:libvirt-daemon-config-network-1.2################################# [ 63%]
  26:libvirt-daemon-config-nwfilter-1.################################# [ 65%]
  27:libvirt-docs-1.2.8-10.el7        ################################# [ 68%]
  28:libvirt-debuginfo-1.2.8-10.el7   ################################# [ 70%]
  29:libvirt-lock-sanlock-1.2.8-10.el7################################# [ 73%]
  30:libvirt-daemon-driver-qemu-1.2.8-################################# [ 75%]
  31:libvirt-daemon-driver-lxc-1.2.8-1################################# [ 78%]
  32:libvirt-daemon-driver-network-1.2################################# [ 80%]
  33:libvirt-daemon-driver-nwfilter-1.################################# [ 83%]
  34:libvirt-daemon-driver-interface-1################################# [ 85%]
  35:libvirt-daemon-driver-nodedev-1.2################################# [ 88%]
  36:libvirt-daemon-driver-secret-1.2.################################# [ 90%]
  37:libvirt-daemon-driver-storage-1.2################################# [ 93%]
  38:libvirt-daemon-1.2.8-10.el7      ################################# [ 95%]
  39:libvirt-login-shell-1.2.8-10.el7 ################################# [ 98%]
  40:libvirt-client-1.2.8-10.el7      ################################# [100%]

[root@ibm-x3850x5-06 libvirt-1.2.8-11.el7]# rpm -q libvirt
libvirt-1.2.8-11.el7.x86_64

[root@ibm-x3850x5-06 libvirt-1.2.8-11.el7]# service libvirtd restart
Redirecting to /bin/systemctl restart  libvirtd.service
[root@ibm-x3850x5-06 libvirt-1.2.8-11.el7]# virsh net-dumpxml host-bridge
<network>
  <name>host-bridge</name>
  <uuid>0b90fed5-2ea9-4ff5-9728-95ef0116fdca</uuid>
  <forward mode='bridge'/>
  <bridge name='br14'/>
</network>

[root@ibm-x3850x5-06 libvirt-1.2.8-11.el7]# rpm -q libvirt-daemon --scripts
postinstall scriptlet (using /bin/sh):

            
if [ $1 -eq 1 ] ; then 
        # Initial installation 
        /usr/bin/systemctl preset virtlockd.socket libvirtd.service libvirtd.socket >/dev/null 2>&1 || : 
fi
preuninstall scriptlet (using /bin/sh):
            
if [ $1 -eq 0 ] ; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable libvirtd.socket libvirtd.service virtlockd.socket virtlockd.service > /dev/null 2>&1 || : 
        /usr/bin/systemctl stop libvirtd.socket libvirtd.service virtlockd.socket virtlockd.service > /dev/null 2>&1 || : 
fi
postuninstall scriptlet (using /bin/sh):
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
    /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1 || :
    /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || :
fi


Move to Verified.

Comment 7 errata-xmlrpc 2015-03-05 07:46:36 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.

https://rhn.redhat.com/errata/RHSA-2015-0323.html


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