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 1316465 - active virtual network based on linux bridge will becase inactive after libvirtd restart
Summary: active virtual network based on linux bridge will becase inactive after libvi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-10 10:39 UTC by Shanzhi Yu
Modified: 2017-02-20 19:01 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.3.3-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:39:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Shanzhi Yu 2016-03-10 10:39:23 UTC
Description of problem:

active virtual network based on linux bridge will becase inactive after libvirtd restart

Version-Release number of selected component (if applicable):

libvirt-1.3.2-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. Prepare a active virtual network based on linux bridge
# virsh net-define /dev/stdin <<EOF
<network>
  <name>net-bridge</name>
  <uuid>f0857c0e-b9b5-41e7-9f3f-0d03b0cefa11</uuid>
  <forward dev='br0' mode='bridge'>
    <interface dev='br0'/>
  </forward>
</network>
EOF

# virsh net-start net-bridge
Network net-bridge started

# virsh net-list 
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 net-bridge           active     no            yes


2. Restart libvirtd daemon
# systemctl restart  libvirtd.service

3. Check virtual network status
# virsh net-list 
 Name                 State      Autostart     Persistent
----------------------------------------------------------


# virsh net-list  --inactive |grep net-bridge
 net-bridge           inactive   no            yes


Actual results:


Expected results:


Additional info:

Comment 1 Laine Stump 2016-03-25 17:31:23 UTC
This is fixed upstream:

commit 2a537fe187fbca9d95816ffdd9db0327f70ae1be
Author: Laine Stump <laine>
Date:   Fri Mar 11 10:59:19 2016 -0500

    network: differentiate macvtap/bridge from host-bridge based networks

Comment 2 Mike McCune 2016-03-28 22:54:17 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 yalzhang@redhat.com 2016-04-07 10:59:34 UTC
verified on libvirt-1.3.3-1.el7.x86_64, the result is as expected.

create a linux bridge, and then define and start a network with mode=bridge.
# virsh net-dumpxml net-bridge
<network>
  <name>net-bridge</name>
  <uuid>f0857c0e-b9b5-41e7-9f3f-0d03b0cefa11</uuid>
  <forward dev='br0' mode='bridge'>
    <interface dev='br0'/>
  </forward>
</network>
# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            yes 
 net-bridge           active     no            yes
# systemctl restart network.service
# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            yes
 net-bridge           active     no            yes

Try macvtap, hostdev, the result is as expected. After restart the libvirtd service, the network status keeps the same.

Comment 7 errata-xmlrpc 2016-11-03 18:39:22 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-2016-2577.html

Comment 8 yalzhang@redhat.com 2017-02-20 04:58:04 UTC
Hi Laine,

This is a common scenario, user may restart libvirtd service or udpate the libvirt packages. So if we need to backport it to RHEL6? (may be rhel6.10, 6.11..). Currently on rhel6.9, libvirt-0.10.2-62.el6.x86_64, bridge, macvtap, hostdev network will stay inactive after libvirtd restart even they were active before the start.

Comment 9 Laine Stump 2017-02-20 19:01:02 UTC
commit 2a537fe187fbca9d95816ffdd9db0327f70ae1be fixes a bug that was introduced in commit b61db335 (first in release 1.2.14), so it wouldn't be applicable to the libvirt 0.10.2 that's in RHEL6.

The failure to maintain the status of bridge, macvtap, and hostdev networks when libvirtd is restarted in RHEL6 is caused by more basic deficiencies in the older code, and requires a much larger set of patches that would not be easily backported to 0.10.2, and anyway two mitigating factors make it less important for the networks to have their active status maintained:

1) in libvirt 0.10.2 bridge, macvtap, and hostdev networks can still be used when they are inactive.

2) if a network is marked as autostart, it will be re-marked as active when libvirtd is restarted (and all devices used by active guests will be re-marked as in-use in the network)

Between those two items, the impact of the bug becomes almost 0, so in my opinion it's unnecessary (and even dangerous, since it would be very likely to introduce new regressions) to fix this behavior in RHEL6. This is why we made the decision several years ago to only fix it upstream, and not attempt a backport to RHEL6.

If you see a practical problem caused by this that can't be overcome by simply marking the network as autostart, we can revisit the issue.


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