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.
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:
Fixed with upstream commit:
commit 0763a26dfef240e301e19b9c563c10462e72f255
Author: Peter Krempa <pkrempa>
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 #
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
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
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: