On Thu, 22 Aug 2013, Serge Hallyn wrote: > Quoting Scott Moser (smo...@ubuntu.com): > > 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. > > > > The one caveat is that setting of the hostname then occurs after > > the initial dhcp, so the hostname sent in the dhcp request would be > > the original one. > > > > Should this prove problematic (possibly for avahi dns) we can revert > > to explicitly writing the hostname into /etc/hostname as well. > > Hi Scott, > > this did manage to set the container name as hostname on first boot, > however apparently not in time for dhcp's send gethostname(). On > first boot, the parent dnsmasq couldn't resolve the hostname, but > after a reboot it could. > > I don't mind applying the patch as is, but is that going to be a problem > for ubuntu-cloud users?
I kind of see this as a broken design in that you're having lxc tell the instance what its hostname is, then having the instance tell dnsmasq, and relying on that for hostname resolution. A better solution would be for lxc to set dnsmasq correctly so dns resolution works independent of the instance's configuration. lxc knows the MAC address. That said, I'll re-send with setting /etc/hostname also. ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel