[Bug 720440] Re: /etc/hosts is updated based on /etc/cloud/templates/hosts.tmpl

Scott Moser smoser at canonical.com
Thu Feb 17 20:30:34 UTC 2011


> If you decide that /etc/hosts should never be overwritten, then please
> at least remove /etc/cloud/templates/hosts.tmpl. But I'd prefer a
> compromise: perhaps if hosts.tmpl exists, then it is used to overwrite
> /etc/hosts, otherwise the original stands. That way a user who wants to
> disable templates just needs to delete the template file.

I'm really weary about changing the current behavior, just because it
would be unexpected to users and their /etc/hosts would be destroyed.
How about this:
 - leave the file in place, but by default doing nothing
 - if cloud-config (/etc/cloud/cloud.cfg) specifies
      manage_etc_hosts: True
   then it will be used
 - comment in the top of /etc/cloud/templates/hosts.tmpl that
   tells about manage_etc_hosts

Would you be ok with that ?

To be honest, the file hosts.tmpl should have just been deleted when the
code was changed to not use it.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in ubuntu.
https://bugs.launchpad.net/bugs/720440

Title:
  /etc/hosts is updated based on /etc/cloud/templates/hosts.tmpl



More information about the Ubuntu-server-bugs mailing list