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 1115858 - libvirt should prevent duplicate portgroup name in virtual network
Summary: libvirt should prevent duplicate portgroup name in virtual network
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
low
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-03 09:18 UTC by Hu Jianwei
Modified: 2015-07-22 05:46 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.10.2-50.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 05:46:10 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 Hu Jianwei 2014-07-03 09:18:04 UTC
Description of problem:
Libvirt had better prevent duplicate portgroup name in virtual network

Version-Release number of selected component (if applicable):
libvirt-0.10.2-40.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
[root@rhel6 ~]# virsh net-dumpxml default
<network>
  <name>default</name>
  <uuid>2b524410-c188-4ace-a0ca-ce5e14dae2a0</uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0' />
  <mac address='52:54:00:7F:FE:79'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254' />
    </dhcp>
  </ip>
  <ip family='ipv6' address='2001:db8:ca2:7::1' prefix='64'>
  </ip>
  <portgroup name='hjw'>
    <bandwidth>
      <inbound average='512' peak='1024' burst='2048'/>
      <outbound average='512' peak='1024' burst='2048'/>
    </bandwidth>
  </portgroup>
  <portgroup name='hjw'>
    <bandwidth>
      <inbound average='128' peak='256' burst='1024'/>
      <outbound average='128' peak='256' burst='1024'/>
    </bandwidth>
  </portgroup>
</network>

Actual results:
As shown above step, two "hjw" portgroups are in default virtual network.

Expected results:
libvirt need check duplicate name of portgroup before net-define and net-edit.

Comment 3 Laine Stump 2015-02-06 18:44:50 UTC
Fix pushed upstream:

commit 2aa7ce6334ff192eb092932aee76d933f45cc39b
Author: Laine Stump <laine>
Date:   Thu Feb 5 14:20:54 2015 -0500

    network: don't allow multiple portgroups with the same name in a network

Comment 6 hongming 2015-03-06 07:05:04 UTC
Verify it as follows.The result is expected. Move its status to VERIFIED.


[root@hongming images]# rpm -q libvirt
libvirt-0.10.2-50.el6.x86_64

[root@hongming images]# rpm -q libvirt
libvirt-0.10.2-50.el6.x86_64
[root@hongming images]# cat network.xml
<network>
<name>portgroup</name>
<forward mode='nat'/>
<bridge name='virbr2' stp='on' delay='0' />
<mac address='52:54:00:7F:FE:79'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254' />
</dhcp>
</ip>
<ip family='ipv6' address='2001:db8:ca2:7::1' prefix='64'>
</ip>
<portgroup name='redhat'>
<bandwidth>
<inbound average='512' peak='1024' burst='2048'/>
<outbound average='512' peak='1024' burst='2048'/>
</bandwidth>
</portgroup>
<portgroup name='redhat'>
<bandwidth>
<inbound average='128' peak='256' burst='1024'/>
<outbound average='128' peak='256' burst='1024'/>
</bandwidth>
</portgroup>
</network>

[root@hongming images]# virsh net-define network.xml
error: Failed to define network from network.xml
error: unsupported configuration: multiple <portgroup> elements with the same name (redhat) in network 'portgroup'

[root@hongming images]# virsh net-create network.xml
error: Failed to create network from network.xml
error: unsupported configuration: multiple <portgroup> elements with the same name (redhat) in network 'portgroup'

[root@hongming images]# virsh net-edit default
error: unsupported configuration: multiple <portgroup> elements with the same name (redhat) in network 'default'
Failed. Try again? [y,n,f,?]:

Comment 9 errata-xmlrpc 2015-07-22 05:46:10 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.