Public bug reported: 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-amd64-puppet- test". This correctly creates /etc/hostname, but /etc/hosts is wrong: $ 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/templates/hosts.tmpl # b.) change or remove the value of 'manage_etc_hosts' in # /etc/cloud/cloud.cfg or cloud-config from user-data # 127.0.1.1 adt-wily-amd64-puppet-test.novalocal adt [...] 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-exitcodes Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1134:in `issue_deprecation_warning') 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[/var/lib/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': getaddrinfo: Name or service not known Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://adt.novalocal/pluginfacts: getaddrinfo: Name or service not known Wrapped exception: getaddrinfo: Name or service not known Info: Retrieving plugin Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': getaddrinfo: Name or service not known Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://adt.novalocal/plugins: getaddrinfo: Name or service not known 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 ** Affects: cloud-init (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1494678 Title: manage_etc_hosts: yes writes wrong hostname with custom hostname To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1494678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs