Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 735950 - The network xml with mutiple dhcp sections can be defined and started successfully although there is prompt error
The network xml with mutiple dhcp sections can be defined and started success...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-06 05:10 EDT by xhu
Modified: 2012-06-20 02:31 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:31:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description xhu 2011-09-06 05:10:38 EDT
Description of problem:
The network xml with mutiple dhcp sections can be defined successfully although there is prompt error

Version-Release number of selected component (if applicable):
libvirt-0.9.4-7.el6.x86_64
qemu-kvm-0.12.1.2-2.185.el6.x86_64
kernel-2.6.32-193.el6.x86_64

How reproducible:
everytimes

Steps to Reproduce:
1. prepare the following network xml with multiple dhcp sections:
# cat multi-dhcp.xml 
<network>
  <name>multi-dhcp</name>
  <forward mode='nat'/>
  <bridge name='virbr10' stp='on' delay='0' />
  <ip address='192.168.201.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.201.2' end='192.168.201.254' />
    </dhcp>
  </ip>
  <ip address='192.168.202.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.202.2' end='192.168.202.254' />
    </dhcp>
  </ip>
  <ip family='ipv6' address='2003:db8:ac10:fe01::1' prefix='64'>
  </ip>
</network>

2. define and start the multi-dhcp network
# virsh net-define multi-dhcp.xml
error: Failed to define network from multi-dhcp.xml
error: unsupported configuration: Multiple dhcp sections found. dhcp is supported only for a single IPv4 address on each network

# echo $?
1

# virsh net-list --all
Name                 State      Autostart
-----------------------------------------    
multi-dhcp           inactive   no

# virsh net-start multi-dhcp
Network multi-dhcp started

Actual results:
The network xml with mutiple dhcp sections can succeed be defined and started although there is prompt error

Expected results:
The network xml with mutiple dhcp sections can not be defined and started successfully

Additional info:
Comment 2 Peter Krempa 2011-12-01 03:55:59 EST
Fixed with upstream commit:
commit 0763a26dfef240e301e19b9c563c10462e72f255
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Wed Nov 30 15:26:25 2011 +0100

    bridge_driver: Don't define network if XML contains more IPv4 adreses.
    
    Only one IPv4 DHCP definition is supported. Originally the code checked
    for a multiple definition and returned an error, but the new domain
    definition was already added to networks. This patch moves the check
    before the newly defined network is added to active networks.
    
     *src/network/bridge_driver.c: networkDefine(): - move multiple IPv4
                                                      addresses check before
                                                      definition is used.


Tested with XML provided in report:

virsh # net-define network.xml 
error: Failed to define network from network.xml
error: unsupported configuration: Multiple dhcp sections found. dhcp is supported only for a single IPv4 address on each network

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

virsh #
Comment 4 xhu 2012-01-10 03:23:08 EST
Verify it with libvirt-0.9.9-1.el6 and it passed.
Comment 6 Peter Krempa 2012-05-02 05:55:26 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation needed
Comment 8 errata-xmlrpc 2012-06-20 02:31:05 EDT
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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

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