hostname not being filled out in etc/hosts

asked 2011-06-28 16:59:15 -0600

bryanpaluch gravatar image

I'm not entirely sure if this is an issue with nova or my uec image but whenever I launch an instance of UEC 10.04 LTS it doesn't add the to the list hosts in etc/hosts . This causes a lot of error messages because it tries to resolve its hostname, but it isn't in the list, and its not in DNS either. I'm using FlatManager. I know I can add it in manually, but I'd like to automate it so I don't have to.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2011-06-28 20:42:26 -0600

bryanpaluch gravatar image

I figured it out. It had to do with the version of UEC I was using. It was ignoring the template set up in /etc/cloud/templates for hosts file. For the UEC images you have to pass

#cloud-config manage_etc_hosts: True

in a file to using euca2ools eg:

root@NovaController:~/cloud-config# more cloud.cfg #cloud-config manage_etc_hosts: True root@NovaController:~/cloud-config# euca-run-instances ami-0000000c -k mykey -t m1.medium -f cloud.cfg

note this only works in UEC that have later versions of cloud-init

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-06-28 16:59:15 -0600

Seen: 582 times

Last updated: Jun 28 '11