manage_etc_hosts: yes writes wrong hostname with custom hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
I use a cloud config like this:
#cloud-config
hostname: adt
manage_etc_hosts: true
Then I start an instance with "nova boot [...] adt-wily-
$ cat /etc/hostname
adt
$ cat /etc/hosts
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/
#
127.0.1.1 adt-wily-
[...]
This results in the fully qualified host name not being resolvable, which breaks e. g. puppet:
$ ping adt.novalocal
ping: unknown host adt.novalocal
$ sudo puppet agent --test --detailed-
Warning: Setting templatedir is deprecated. See http://
(at /usr/lib/
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: getaddrinfo: Name or service not known
Info: Retrieving pluginfacts
Error: /File[/
Error: /File[/
Wrapped exception:
getaddrinfo: Name or service not known
Info: Retrieving plugin
Error: /File[/
Error: /File[/
Wrapped exception:
getaddrinfo: Name or service not known
Error: Could not retrieve catalog from remote server: getaddrinfo: Name or service not known
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: getaddrinfo: Name or service not known
Changed in cloud-init (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |