Bug 630627

Summary: Add --dhcp-no-override option when starting dnsmasq
Product: Red Hat Enterprise Linux 5 Reporter: Jiri Denemark <jdenemar>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 5.6CC: dyuan, eblake, mjenner, mzhan, veillard, virt-maint, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.2-4.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 623951 Environment:
Last Closed: 2011-01-13 23:16:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 623951    
Bug Blocks:    

Description Jiri Denemark 2010-09-06 12:45:42 UTC
+++ This bug was initially created as a clone of Bug #623951 +++

Description of problem:

Clone of a corresponding bug fixed in RHEL-6...

When booting from PXE via a TFTP server in a virtual network.

<network>
  <name>newpxe2</name>
  <forward mode='nat'/>
  <ip address="192.168.123.1" netmask="255.255.255.0">
    <tftp root="/var/lib/tftpboot" />
    <dhcp>
      <range start="192.168.123.2" end="192.168.123.254" />
      <bootp file="pxelinux.0" />
    </dhcp>
  </ip>
</network>

# ls -l /var/lib/tftpboot/
total 28848
-rw-r--r--. 1 root root 29515304 May 21 23:47 initrd.img
-rw-r--r--. 1 root root    16794 May 22 04:20 pxelinux.0
drwxr-xr-x. 2 root root     4096 May 22 06:50 pxelinux.cfg
-rw-r--r--. 1 root root        0 May 22 06:57 vmlinuz

# cat /var/lib/tftpboot/pxelinux.cfg/default 
default linux
label linux
kernel vmlinuz
append initrd=initrd.img

The guest could get an IP address, and it said,

No filename or root path specified
No more network devices


The original bug was postponed to 6.1 since there is a known workaround of adding --dhcp-no-override option to dnsmasq. Hence we need to teach libvirt to use that option.

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

Comment 3 Min Zhan 2010-10-12 10:24:03 UTC
Verified with below RHEL5U6 6 archs, and the results are passed.
-RHEL5.6-Server-xen-i386, 
-RHEL5.6-Server-xen-x86_64
-RHEL5.6-Server-xen-ia64
-RHEL5.6-Client-xen-i386
-RHEL5.6-Client-xen-x86_64
-RHEL5.6-Server-kvm-x86_64

Detailed steps are as following:
   # cat tftp.xml
      <network>
        <name>netboot</name>
        <bridge name="virbr1" stp='off' delay='1'/>
        <forward/>
        <ip address="192.168.10.1" netmask="255.255.255.0">
          <tftp root="/var/lib/tftpboot" />
           <dhcp>
              <range start="192.168.10.2" end="192.168.10.254" />
              <bootp file="pxelinux.0" />
          </dhcp>
        </ip>
      </network>

   # virsh net-define tftp.xml
      Network netboot defined from tftp.xml

   # virsh net-start netboot
      Network netboot started

   # ps -ef|grep dns|grep netboot
      nobody 6431 1 0 09:43 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/netboot.pid --conf-file= --listen-address 192.168.10.1 --except-interface lo --dhcp-range 192.168.10.2,192.168.10.254 --dhcp-lease-max=253 --dhcp-no-override --enable-tftp --tftp-root /var/lib/tftpboot --dhcp-boot pxelinux.0

Expected result: "--dhcp-no-override" is seen here.

Comment 4 dyuan 2010-10-19 02:33:26 UTC
According to the comment 3, change the bug status to verified.

Comment 6 errata-xmlrpc 2011-01-13 23:16:08 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