Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 949926

Summary: The transient network will be vanished after libvirtd restart.
Product: Red Hat Enterprise Linux 7 Reporter: hongming <honzhang>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, cwei, dyuan, jdenemar, mzhan, pkrempa
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.0.5-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 949915 Environment:
Last Closed: 2014-06-13 13:01:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hongming 2013-04-09 09:58:28 UTC
Description of problem:
The transient network will be vanished after libvirtd restart. 

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

How reproducible:
100%

Steps to Reproduce:

1.
# cat network1.xml
<network>
    <name>definebr</name>
    <forward/>
    <bridge name='definebr' stp='on' forwardDelay='0' />
    <ip address='10.0.0.1' netmask='255.255.255.0'>
      <dhcp>
        <range start='10.0.0.2' end='10.0.0.254' />
      </dhcp>
    </ip>
  </network>

2.
# virsh net-create network1.xml
Network definebr created from network1.xml

3.
# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes
 definebr             active     no            no

4.
# /bin/systemctl restart  libvirtd.service

5.
# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes

6.
# brctl show
bridge name	bridge id		STP enabled	interfaces
definebr		8000.525400515fe2	yes		definebr-nic
virbr0		8000.525400a4ed88	yes		virbr0-nic

7.
# virsh net-create network1.xml
error: Failed to create network from network1.xml
error: internal error Network is already in use by interface definebr

  
Actual results:
The transient network will be vanished after libvirtd restart. 

Expected results:
The transient network still work after libvirtd restart.

Additional info:

Comment 2 Jiri Denemark 2013-04-09 16:11:38 UTC
Next time when filing one bug for both RHEL6 and RHEL7, could you, please, create one of them as a clone of the other so that they are explicitly linked with each other?

Comment 3 hongming 2013-04-12 02:38:11 UTC
OK , I will pay attention to it next time. 
Clone of Bug 949915 - The transient network will be vanished after libvirtd restart

Comment 4 Peter Krempa 2013-04-19 14:52:46 UTC
As of v1.0.4-215-g446dd66, libvirtd doesn't forget transient networks when restarted.

commit 446dd66b7c7641974d25423c4cb5c48e481a84e4
Author: Peter Krempa <pkrempa>
Date:   Tue Apr 16 18:35:59 2013 +0200

    network: bridge_driver: don't lose transient networks on daemon restart
    
    Until now tranisent networks weren't really useful as libvirtd wasn't
    able to remember them across restarts. This patch adds support for
    loading status files of transient networks (that already were generated)
    so that the status isn't lost.
    
    This patch chops up virNetworkObjUpdateParseFile and turns it into
    virNetworkLoadState and a few friends that will help us to load status
    XMLs and refactors the functions that are loading the configs to use
    them.

Comment 5 hongming 2013-05-07 02:17:25 UTC
Verify it as follows. The result is expected. Move its status to VERIFIED.

# cat network1.xml
<network>
    <name>definebr</name>
    <forward/>
    <bridge name='definebr' stp='on' forwardDelay='0' />
    <ip address='10.0.0.1' netmask='255.255.255.0'>
      <dhcp>
        <range start='10.0.0.2' end='10.0.0.254' />
      </dhcp>
    </ip>
  </network>

# virsh net-create network1.xml
Network definebr created from network1.xml

# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes
 definebr             active     no            no

# /bin/systemctl restart  libvirtd.service


# virsh net-list --all
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes
 definebr             active     no            no

Comment 6 Ludek Smid 2014-06-13 13:01:06 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.