Comment 2 for bug 1365671

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: juju + maas provider: ceph-mon doesn't listen on localhost, /etc/hosts munged

cloud-init's manage_etc_hosts option is set to "localhost". From the maas node:

>>> f = open("/var/lib/cloud/instances/node-c528fe88-ab86-11e3-8c77-2c59e54ace74/obj.pkl", "r")
>>> data = pickle.load(f)
>>> data.sys_cfg["manage_etc_hosts"]
'localhost'

According to the docs:
# * manage_etc_hosts:
# default: false
(...)
# localhost:
# This option ensures that an entry is present for fqdn as described in
# section 5.1.2 of the debian manual
# http://www.debian.org/doc/manuals/debian-reference/ch05.en.html
#
# cloud-init will generally own the 127.0.1.1 entry, and will update
# it to the hostname and fqdn on every boot. All other entries will
# be left as is. 'ping `hostname`' will ping 127.0.1.1

So that's what added the 127.0.1.1 entry with both hostname and fqdn to /etc/hosts.