Bug 597363 - Static only DHCP not supported in network configs.
Summary: Static only DHCP not supported in network configs.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-28 18:07 UTC by Neil Wilson
Modified: 2011-01-13 23:13 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.8.2-4.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 611793 (view as bug list)
Environment:
Last Closed: 2011-01-13 23:13:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0060 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-01-12 17:22:30 UTC

Description Neil Wilson 2010-05-28 18:07:27 UTC
Description of problem:

If you specify only 'host' entries in the dhcp section, then no dnsmasq is started up.


Version-Release number of selected component (if applicable):
Using library: libvir 0.6.3



How reproducible:


Steps to Reproduce:

Use network 

<network>
  <name>brbb6fd2</name>
  <uuid>f90a9a4b-449b-ae12-c0ac-d80255141a77</uuid>
  <forward dev='bond0' mode='route'/>
  <bridge name='brbb6fd2' stp='off' forwardDelay='0' />
  <ip address='10.187.111.209' netmask='255.255.255.252'>
    <dhcp>
      <host mac='00:16:3e:bb:6f:d2' name='xenhvmlvm' ip='10.187.111.210' />
    </dhcp>
  </ip>
</network>

and start the network. 

  
Actual results:

No dnsmasq is started.


Expected results:

Should start up a dnsmasq serving only static entries by including an appropriate dhcp-range flag.

For example above should including something like:

--dhcp-range=10.187.111.209,static


Additional info:

workaround is to include the network broadcast address as a single range. So for above that would be

    <dhcp>
      <range start='10.187.111.211' end='10.187.111.211' />
      <host mac='00:16:3e:bb:6f:d2' name='xenhvmlvm' ip='10.187.111.210' />
    </dhcp>

Comment 2 Jiri Denemark 2010-09-09 14:10:09 UTC
Patch sent upstream as https://www.redhat.com/archives/libvir-list/2010-September/msg00134.html

Comment 5 Jiri Denemark 2010-09-13 21:54:34 UTC
Fix built into libvirt-0.8.2-4.el5

Comment 7 Johnny Liu 2010-10-22 12:52:14 UTC
Verified this bug with libvirt-0.8.2-8.el5 on RHEL5u6 Server X86_64(KVM, xenfv, and xenpv), RHEL5u6 Client I386(xenfv and xenpv) and RHEL5u6 Server IA64 (xenfv and xenpv), PASSED.

Steps:
1. Prepare virtual network xml file:
# cat  s1.xml 
<network>
  <name>s1</name>
  <forward mode='nat'/>
  <bridge name='s1' stp='on' delay='0' />
  <ip address='192.168.100.1' netmask='255.255.255.0'>
    <dhcp>
        <host mac='00:16:36:7b:4a:21' name='new-host1' ip='192.168.100.33' />
    </dhcp>
  </ip>
</network>

2. Define and start the network.
# virsh net-define s1.xml
# virsh net-start s1

3. Check dnsmasq process:
# ps -ef|grep dnsmasq|grep s1
nobody    5095     1  0 07:17 ?        00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/s1.pid --conf-file=  --listen-address 192.168.100.1 --except-interface lo --dhcp-range 192.168.100.1,static --dhcp-no-override --dhcp-hostsfile=/var/lib/libvirt/dnsmasq/s1.hostsfile

4. Start a domain which is using the dnsmasq dhcp server.

5. In guest, get IP - 192.168.100.33 and hostname successfully.

So this bug is fixed.

Comment 8 Neil Wilson 2011-01-06 10:51:48 UTC
This functionality has been broken in version 0.8.7.

https://bugzilla.redhat.com/show_bug.cgi?id=667643 refers.

Comment 10 errata-xmlrpc 2011-01-13 23:13:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0060.html


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