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 1146310 - guest interface which use existing bridge source bridge will disappear after libvirtd restart
Summary: guest interface which use existing bridge source bridge will disappear after ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1140085
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-25 01:25 UTC by Luyao Huang
Modified: 2015-07-22 05:47 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.10.2-47.el6
Doc Type: Bug Fix
Doc Text:
Clone Of: 1140085
Environment:
Last Closed: 2015-07-22 05:47:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1252 0 normal SHIPPED_LIVE libvirt bug fix update 2015-07-20 17:50:06 UTC

Description Luyao Huang 2014-09-25 01:25:07 UTC
This bug also can be reproduced in RHEL6,so clone a new bug for RHEL6.7
and Version-Release of RHEL6:
libvirt-0.10.2-46.el6.x86_64

+++ This bug was initially created as a clone of Bug #1140085 +++

Description of problem:
guest interface which use existing bridge source bridge will disappear after libvirtd restart

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

How reproducible:
100%

Steps to Reproduce:
1.prepare a virtual network which use host exist bridge
# virsh net-dumpxml host-bridge
<network connections='2'>
  <name>host-bridge</name>
  <uuid>3b251430-0eb4-4670-96e5-9ddd6d0bd90f</uuid>
  <forward mode='bridge'/>
  <bridge name='br13'/>
</network>

2.# brctl show
bridge name        bridge id                STP enabled        interfaces
br13                8000.525400094d3f        no                br13-nic
                                                                


3.# virsh net-start host-bridge
Network host-bridge started

4.prepare a running guest
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 13    test3                          running

5.# virsh attach-interface test3 network host-bridge
Interface attached successfully

6.# virsh dumpxml test3
    <interface type='bridge'>
      <mac address='52:54:00:d3:16:22'/>
      <source bridge='br13'/>
      <target dev='vnet2'/>
      <model type='rtl8139'/>
      <alias name='net2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </interface>

7.# brctl show
bridge name        bridge id                STP enabled        interfaces
br13                8000.525400094d3f        no                br13-nic
                                                                vnet2

8.# service libvirtd restart
Redirecting to /bin/systemctl restart  libvirtd.service

9.# virsh dumpxml test3
    <interface type='bridge'>
      <mac address='52:54:00:d3:16:22'/>
      <target dev='vnet2'/>
      <model type='rtl8139'/>
      <alias name='net2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </interface>

10.# virsh domiflist test3
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet2      bridge     -          rtl8139     52:54:00:d3:16:22




11.
# brctl show
bridge name        bridge id                STP enabled        interfaces
br13                8000.525400094d3f        no                br13-nic
                                                                vnet2

12.some virsh command cannot be used 
#virsh detach-interface test3 network 52:54:00:d3:16:22
error: Failed to detach interface
error: internal error: No <source> 'bridge' attribute specified with <interface type='bridge'/>

Actual results:
guest interface which use existing bridge source bridge will disappear after libvirtd restart

Expected results:
source bridge should not disappear after libvirtd restart

Additional info:

Comment 3 Hu Jianwei 2014-12-16 04:02:04 UTC
Verified as below:

[root@hp-dl385g7-05 ~]# rpm -q libvirt qemu-kvm
libvirt-0.10.2-47.el6.x86_64
qemu-kvm-0.12.1.2-2.445.el6.x86_64

<1>
[root@hp-dl385g7-05 ~]# virsh net-dumpxml host-bridge
<network>
  <name>host-bridge</name>
  <uuid>f0715f65-53e1-c56c-66f2-4c99e3812bbd</uuid>
  <forward mode='bridge'/>
  <bridge name='br99' />
</network>

[root@hp-dl385g7-05 ~]# virsh net-list --all
Name                 State      Autostart     Persistent
--------------------------------------------------
default              active     yes           yes
host-bridge          active     no            yes

[root@hp-dl385g7-05 ~]# virsh net-dumpxml host-bridge
<network>
  <name>host-bridge</name>
  <uuid>f0715f65-53e1-c56c-66f2-4c99e3812bbd</uuid>
  <forward mode='bridge'/>
  <bridge name='br99' />
</network>

[root@hp-dl385g7-05 ~]# brctl show
bridge name	bridge id		STP enabled	interfaces
br99		8000.000000000000	no		
virbr0		8000.5254003c535f	yes		virbr0-nic
[root@hp-dl385g7-05 ~]# 
[root@hp-dl385g7-05 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     r6                             running

[root@hp-dl385g7-05 ~]# virsh attach-interface r6 network host-bridge
Interface attached successfully

[root@hp-dl385g7-05 ~]# virsh dumpxml r6| grep \<interface -A5
    <interface type='bridge'>
      <mac address='52:54:00:14:2e:24'/>
      <source bridge='br99'/>
      <target dev='vnet1'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
[root@hp-dl385g7-05 ~]# brc
brcm_iscsiuio  brctl          
[root@hp-dl385g7-05 ~]# brctl show
bridge name	bridge id		STP enabled	interfaces
br99		8000.fe5400142e24	no		vnet1
virbr0		8000.5254003c535f	yes		virbr0-nic
[root@hp-dl385g7-05 ~]# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]
[root@hp-dl385g7-05 ~]# virsh dumpxml r6| grep \<interface -A5
    <interface type='bridge'>
      <mac address='52:54:00:14:2e:24'/>
      <source bridge='br99'/>
      <target dev='vnet1'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
[root@hp-dl385g7-05 ~]# virsh domiflist r6
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet1      bridge     br99       -           52:54:00:14:2e:24

[root@hp-dl385g7-05 ~]# virsh detach-interface r6 bridge 52:54:00:14:2e:24
Interface detached successfully

[root@hp-dl385g7-05 ~]# virsh dumpxml r6| grep \<interface -A5
[root@hp-dl385g7-05 ~]# 


<2> Error message checking(Only for testing the error message output, force to remove below lines from /var/run/libvirt/qemu/r6.xml invalidly)
+++++++++++++++++++
        <actual type='bridge'>
          <source bridge='br99'/>
        </actual>
+++++++++++++++++++

[root@hp-dl385g7-05 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     r6                             running

[root@hp-dl385g7-05 ~]# virsh attach-interface r6 network host-bridge
Interface attached successfully

[root@hp-dl385g7-05 ~]# vim /var/run/libvirt/qemu/r6.xml
[root@hp-dl385g7-05 ~]# virsh dumpxml r6| grep \<interface -A5
    <interface type='bridge'>
      <mac address='52:54:00:0c:8b:ef'/>
      <source bridge='br99'/>
      <target dev='vnet1'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
[root@hp-dl385g7-05 ~]# > /var/log/libvirt/libvirtd.log 
[root@hp-dl385g7-05 ~]# service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  OK  ]
[root@hp-dl385g7-05 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     r6                             shut off

[root@hp-dl385g7-05 ~]# cat /var/log/libvirt/libvirtd.log 
2014-12-16 03:54:59.861+0000: 11362: info : libvirt version: 0.10.2, package: 47.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2014-12-11-07:56:01, x86-022.build.eng.bos.redhat.com)
2014-12-16 03:54:59.861+0000: 11362: error : virDomainActualNetDefParseXML:4943 : internal error Missing <source> element with bridge name in interface's <actual> element
[root@hp-dl385g7-05 ~]#

Comment 5 errata-xmlrpc 2015-07-22 05:47:41 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/RHBA-2015-1252.html


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