Neutron DHCP agent generates invalid hostnames for new version of dnsmasq

Bug #1204125 reported by Kyle Mestery
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Kyle Mestery
Grizzly
Fix Released
Medium
Gary Kotton

Bug Description

The latest version of Fedora includes this version of dnsmasq:

[kmestery@km-dhcp-64-245 neutron]$ dnsmasq --version
Dnsmasq version 2.66 Copyright (c) 2000-2013 Simon Kelley
Compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth

This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.
[kmestery@km-dhcp-64-245 neutron]$

According to this bug filed on Fedora here [1] and my own experience, the hostnames the Neutron DHCP agent generates start with numbers (the IP addresses), and apparently this is no longer valid for this new version of dnsmasq.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=983672

Tags: l3-ipam-dhcp
Revision history for this message
Kyle Mestery (mestery) wrote :

Per discussion with @rkukura, looks like this may be a bug in dnsmasq. RFC 952 prohibited hostnames from starting with a digit, but RFC 1123 allows it. I'm looking at the dnsmasq source code now.

Revision history for this message
Kyle Mestery (mestery) wrote :

FYI: I've sent a bug report and patch to the dnsmasq-discuss mailing list [1]. But I still think in the short term we should fix this here. As more distributions upgrade to newer dnsmasq, this will hit more and more people.

[1] http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2013q3/007369.html

Revision history for this message
Mark McClain (markmcclain) wrote :

As discussed over IRC, I think a simple work around is to add 'host-' prefix to the generated hostname. We will want to fix this upstream. I expect there will be other proposals in Icehouse or earlier to leverage the port name attribute to build the hostname and folks may want to use solely numbers.

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/38376

Revision history for this message
Kyle Mestery (mestery) wrote :

The patch to dnsmasq was accepted, but as Mark indicates, we'll still address this in Neutron above. I'd also like to consider this patch for backporting to stable/grizzly as well.

tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/38376
Committed: http://github.com/openstack/neutron/commit/acebf769a41a9a55cdc6789bf4962ea64cf87773
Submitter: Jenkins
Branch: master

commit acebf769a41a9a55cdc6789bf4962ea64cf87773
Author: Kyle Mestery <email address hidden>
Date: Tue Jul 23 15:17:20 2013 +0000

    Fix DHCP agent to work with latest dnsmasq

    The latest dnsmasq no longer accepts hostnames which begin with a number. This
    affects Fedora 19 right now, and will mean Fedora 19 will not work with Neutron
    DHCP. dnsmasq should work with hostnames beginning with a number (RFC 1123 says
    this is valid), but until this is fixed, many users will be left unable to use
    Fedora 19 with Neutron.

    This patch adds a "host-" prefix to each hostname entry generated by the DHCP
    agent. This fixes the issue in Neutron.

    Fixes bug 1204125

    Change-Id: I0e29ec033969c3fb958ed3a12b8962b73b0e3d94

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/39167

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/grizzly)

Reviewed: https://review.openstack.org/39167
Committed: http://github.com/openstack/neutron/commit/61d131999281abffa6489c72c9fb7e637008e0ee
Submitter: Jenkins
Branch: stable/grizzly

commit 61d131999281abffa6489c72c9fb7e637008e0ee
Author: Kyle Mestery <email address hidden>
Date: Tue Jul 23 15:17:20 2013 +0000

    Fix DHCP agent to work with latest dnsmasq

    The latest dnsmasq no longer accepts hostnames which begin with a number. This
    affects Fedora 19 right now, and will mean Fedora 19 will not work with Neutron
    DHCP. dnsmasq should work with hostnames beginning with a number (RFC 1123 says
    this is valid), but until this is fixed, many users will be left unable to use
    Fedora 19 with Neutron.

    This patch adds a "host-" prefix to each hostname entry generated by the DHCP
    agent. This fixes the issue in Neutron.

    Fixes bug 1204125

    Change-Id: I0e29ec033969c3fb958ed3a12b8962b73b0e3d94
    (cherry picked from commit acebf769a41a9a55cdc6789bf4962ea64cf87773)

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential in-stable-grizzly
tags: added: l3-ipam-dhcp
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.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.