]> git.proxmox.com Git - mirror_lxc.git/commit
hooks/ubuntu-cloud-prep: add hostname to meta-data
authorScott Moser <smoser@ubuntu.com>
Thu, 22 Aug 2013 19:38:48 +0000 (15:38 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 22 Aug 2013 20:29:06 +0000 (15:29 -0500)
commitcb0c6c020314ee0fea0ce30d209711f7e9c29aaa
treead010ce044e6f74eba6d77aab562304286a6f105
parent92b0b5bac5717e5281f51340192288050409ad47
hooks/ubuntu-cloud-prep: add hostname to meta-data

prior to my enabling of the clone hook, the setting of the hostname
was being done by writing to /etc/hostname.  Instead of relying on that
we're now writing 'local-hostname' into the metadata for the instance.

cloud-init then reads this and sets the hostname properly.

We are also writing /etc/hostname with the new hostname explicitly.  This is
useful/necessary because on network bringup of eth0, dhclient will submit its
hosname.  The updating done by cloud-init occurs to late, and thus
the dhcp request goes out with the un-configured hostname and dns doens't
work correctly.

Signed-off-by: Scott Moser <smoser@ubuntu.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
hooks/ubuntu-cloud-prep