Dnsmasq config files syntax issue when dhcp_domain is empty

Bug #1326256 reported by Bertrand Lallau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Bertrand Lallau

Bug Description

A previous fix as already been done to manage an empty dhcp_domain:
https://bugs.launchpad.net/neutron/+bug/1099625

Hence in case of an empty dhcp_domain it remains a bug on Dnsmasq config files.

With an empty dhcp_domain Dnsmasq launch command line will be:

 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tapbdb96782-bb --except-interface=lo --pid-file=/var/lib/neutron/dhcp/c80662aa-9550-44e6-97f5-a1628b3fca0e/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/c80662aa-9550-44e6-97f5-a1628b3fca0e/host --addn-hosts=/var/lib/neutron/dhcp/c80662aa-9550-44e6-97f5-a1628b3fca0e/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/c80662aa-9550-44e6-97f5-a1628b3fca0e/opts --leasefile-ro --dhcp-range=set:tag0,20.0.0.0,static,86400s --dhcp-lease-max=256 --conf-file=

"addn_hosts" file contains:
20.0.0.3 host-20-0-0-3. host-20-0-0-3
20.0.0.4 host-20-0-0-4. host-20-0-0-4

"host" file contains:
fa:16:3e:bf:e1:e4,host-20-0-0-3.,20.0.0.3
fa:16:3e:5f:88:81,host-20-0-0-4.,20.0.0.4

=> for both "addn_hosts" and "host" files the hostname (2nd parameter) is ended with an extra dot char.
(it should be "host-20-0-0-3" instead of "host-20-0-0-3." )

So generated files should be:

"addn_hosts" file:
20.0.0.3 host-20-0-0-3 host-20-0-0-3
20.0.0.4 host-20-0-0-4 host-20-0-0-4

"host" file:
fa:16:3e:bf:e1:e4,host-20-0-0-3,20.0.0.3
fa:16:3e:5f:88:81,host-20-0-0-4,20.0.0.4

Changed in neutron:
assignee: nobody → Bertrand Lallau (bertrand-lallau)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/99387

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/99387
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8fb69a4633e87446eadd7f0173a0168f78604cbe
Submitter: Jenkins
Branch: master

commit 8fb69a4633e87446eadd7f0173a0168f78604cbe
Author: Bertrand Lallau <email address hidden>
Date: Wed Jun 11 15:46:58 2014 +0200

    Dnsmasq config files syntax issue when dhcp_domain is empty

    When using dhcp-agent with the following property dhcp_domain=""
    addn_hosts and host files genererated for Dnsmasq have wrong syntax
    concerning hostname parameter (dot char at the end).

    As described in RFC-952 the hostname grammar is as follows:
    <hname> ::= <name>*["."<name>]
    <name> ::= <let>[*[<let-or-digit-or-hyphen>]<let-or-digit>]
    Hence it can't be conclude with a dot char.

    Dnsmasq process is waiting for a hostname (2nd parameter) in the
    following files:
    "addn_hosts" file contains:
       20.0.0.3 host-20-0-0-3. host-20-0-0-3
    "host" file contains:
       fa:16:3e:bf:e1:e4,host-20-0-0-3.,20.0.0.3

    With the patch you will get:
    "addn_hosts":
       20.0.0.3 host-20-0-0-3 host-20-0-0-3
    "host":
       fa:16:3e:bf:e1:e4,host-20-0-0-3,20.0.0.3

    Change-Id: I4c10169019becaed6b2968b74f03ef356244a057
    Closes-Bug: #1326256

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.