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 889480 - net-define network is not persistent
Summary: net-define network is not persistent
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-21 10:53 UTC by yanbing du
Modified: 2014-06-18 00:43 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.0.2-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:10:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yanbing du 2012-12-21 10:53:05 UTC
Description of problem:
Use virsh net-define command to define a network, the network is not persistent, after destroy, it will gone.

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

How reproducible:
100%

Steps to Reproduce:
1.Prepare a network xml, which can dump from the default network
# virsh net-dumpxml tt
<network>
  <name>tt</name>
  <uuid>6e9bb2dd-b99d-630f-39d1-b69a806da550</uuid>
  <forward mode='nat'/>
  <bridge name='virbr1' stp='on' delay='0' />
  <mac address='52:54:00:E5:B6:95'/>
  <ip address='192.168.121.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.121.2' end='192.168.121.254' />
    </dhcp>
  </ip>
</network>

2. Define, start and destroy the network
# virsh net-define de.xml 
Network tt defined from de.xml

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

# virsh net-start tt
Network tt started

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

# virsh net-destroy tt
Network tt destroyed

# virsh net-list --all
Name                 State      Autostart     Persistent
--------------------------------------------------
default              active     yes           yes
  
Actual results:
The new define network is not persistent.

Expected results:
net-define network should be persistent.

Additional info:

Comment 2 yanbing du 2012-12-24 08:35:33 UTC
Hi Laine,

I tested this bug with libvirt-0.9.11.3-1.el7.x86_64
# virsh net-list --all
Name                 State      Autostart
-----------------------------------------
default              active     yes       
net1                 active     no        

There's no 'Persistent' parameter when list networks.

# virsh net-info net1
Name            net1
UUID            de9fb474-0882-b37a-d22a-498a19776d7f
Active:         yes
Persistent:     yes
Autostart:      no
Bridge:         virbr1

The new defined network is persistent.

Do you thinks this's a regression bug?

Comment 3 Osier Yang 2012-12-26 08:53:53 UTC
This is regression introduced by commit 0211fd6e04: See,

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

Comment 6 Peter Krempa 2013-01-11 13:15:12 UTC
Fixed upstream:

commit bb19491cf5e3b78f2d72bbcbcc06e985d29b7f4b
Author: Peter Krempa <pkrempa>
Date:   Fri Jan 11 11:10:34 2013 +0100

    network: bridge: Fix regression when defining persistent networks
    
    Commit 0211fd6e04cdc402da20818df54299c6ded3d3cb introduced regression
    where newly defined networks were not made persistent.
    
    This patch makes the network persistent on each successful definition.

Moving to POST.

Comment 7 hongming 2013-02-05 05:49:15 UTC
Verify it as follows. Change its status to VERIFIED.

Versions
libvirt-1.0.2-1.el7.x86_64

#cat network.xml
<network>
  <name>tt</name>
  <uuid>6e9bb2dd-b99d-630f-39d1-b69a806da550</uuid>
  <forward mode='nat'/>
  <bridge name='virbr1' stp='on' delay='0' />
  <mac address='52:54:00:E5:B6:95'/>
  <ip address='192.168.121.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.121.2' end='192.168.121.254' />
    </dhcp>
  </ip>
</network>

# virsh net-define network.xml
Network tt defined from network.xml


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

# virsh net-start tt
Network tt started

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


# virsh net-destroy tt
Network tt destroyed

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

Comment 8 Ludek Smid 2014-06-13 12:10:11 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.


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