dnsmasq does not use -h, so /etc/hosts sends folks to loopback when they look up the machine it's running on

Bug #1201873 reported by Nick Moffitt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Sean Dague
nova (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

 from dnsmasq(8):

      -h, --no-hosts
              Don't read the hostnames in /etc/hosts.

I reliably get bit by this during certain kinds of deployments, where my nova-network/dns host has an entry in /etc/hosts such as:

127.0.1.1 hostname.example.com hostname

I keep having to edit /etc/hosts on that machine to use a real IP, because juju gets really confused when it looks up certain openstack hostnames and gets sent to its own instance!

Tags: network
Matt Riedemann (mriedem)
tags: added: network
Revision history for this message
Dan Smith (danms) wrote :

This sounds like a JuJu problem to me :)

IMHO, /etc/hosts should not redirect $HOSTNAME to anything other than a routable external interface in a real environment with working DNS. Assuming your machine is not called "localhost" I think that this is a configuration issue.

Changed in nova:
status: New → Opinion
Revision history for this message
Dan Smith (danms) wrote :

Oh, I misread what you were using JuJu for, thinking it was deploying your host. So, ignore the first line of my last comment. But, a config issue nonetheless, IMHO :)

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

Dan, this is the default behaviour for Ubuntu, which is the reference platform for Openstack.

Surely adding the -h flag would be easy and harmless, no?

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

This bug describes and interaction between Openstack and Ubuntu, for the most part.

affects: nova → nova (Ubuntu)
Changed in nova (Ubuntu):
status: Opinion → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nova (Ubuntu):
status: New → Confirmed
James Page (james-page)
Changed in nova (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
Sean Dague (sdague) wrote :

Under multihost we turn this on, so I think it's probably fine to also turn it on in the single host or single network node case.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Sean Dague (sdague)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/118613
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1e3d2fbcb13e01bee0a8f90bd2078b1f5063b4d5
Submitter: Jenkins
Branch: master

commit 1e3d2fbcb13e01bee0a8f90bd2078b1f5063b4d5
Author: Sean Dague <email address hidden>
Date: Wed Sep 3 07:49:51 2014 -0400

    always set --no-hosts for dnsmasq

    Many network modes in nova-network disable reading host entries from
    /etc/hosts. This includes running vish-ha (multihost), or if you ever
    set a dns server. However if you don't do these things we continue to
    use /etc/hosts.

    It's not clear that this does anything other than create
    inconsistency. There is a long standing bug that exists around this
    because the impacts include exposing localhost as a dns entry on the
    network.

    Change-Id: Ibccf0999bfd4b37f2d948af34640260f95c54572
    Closes-Bug: #1201873

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
Chuck Short (zulcss)
Changed in nova (Ubuntu):
status: Triaged → Fix Released
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.