If I'm not mistaken the explicit manage_etc_hosts is coming from here: https://git.launchpad.net/maas/tree/src/maasserver/compose_preseed.py#n403
> def get_base_preseed(node=None):
> """Return the base preseed config used by all ephemeral environments."""
> cloud_config = {
> # The ephemeral environment doesn't have a domain search path set which
> # causes sudo to fail to resolve itself and print out a warning
> # message. These messages are caught when logging during commissioning
> # and testing. Allow /etc/hosts to be managed by cloud-init so the
> # lookup works. This may cause LP:1087183 to come back if anyone tries
> # to JuJu deploy in an ephemeral environment.
> "manage_etc_hosts": True
> }
Then, it looks like this commit dropped a condition for manage_etc_hosts=False without much of explanation. https://git.launchpad.net/maas/commit/?id=22641cffccea44ded1d20a72d84ba23856730d05
> - config = {
> - # Do not let cloud-init override /etc/hosts/: use the default
> - # behavior which means running `dns_resolve(hostname)` on a node
> - # will query the DNS server (and not return 127.0.0.1).
> - # See bug 1087183 for details.
> - "manage_etc_hosts": False,
manage_etc_hosts=False has the least surprises for MAAS users obviously but if there is a good reason to stick to manage_etc_hosts=True, we should document that explicitly and guide users how to deal with /etc/hosts properly, IMO.
If I'm not mistaken the explicit manage_etc_hosts is coming from here: /git.launchpad. net/maas/ tree/src/ maasserver/ compose_ preseed. py#n403 preseed( node=None) :
https:/
> def get_base_
> """Return the base preseed config used by all ephemeral environments."""
> cloud_config = {
> # The ephemeral environment doesn't have a domain search path set which
> # causes sudo to fail to resolve itself and print out a warning
> # message. These messages are caught when logging during commissioning
> # and testing. Allow /etc/hosts to be managed by cloud-init so the
> # lookup works. This may cause LP:1087183 to come back if anyone tries
> # to JuJu deploy in an ephemeral environment.
> "manage_etc_hosts": True
> }
It wasn't like that when manage_ etc_hosts= True was introduced initially and it was purely for an ephemeral environment instead of deployed one. /git.launchpad. net/maas/ commit/ ?id=976cd6ca527 3da289c6b769d28 70614a28de87e5 /bugs.launchpad .net/maas/ +bug/1670444
https:/
https:/
Then, it looks like this commit dropped a condition for manage_ etc_hosts= False without much of explanation. /git.launchpad. net/maas/ commit/ ?id=22641cffcce a44ded1d20a72d8 4ba23856730d05 hostname) ` on a node
https:/
> - config = {
> - # Do not let cloud-init override /etc/hosts/: use the default
> - # behavior which means running `dns_resolve(
> - # will query the DNS server (and not return 127.0.0.1).
> - # See bug 1087183 for details.
> - "manage_etc_hosts": False,
manage_ etc_hosts= False has the least surprises for MAAS users obviously but if there is a good reason to stick to manage_ etc_hosts= True, we should document that explicitly and guide users how to deal with /etc/hosts properly, IMO.