fwiw, its sudo that is causing the roundtrip.
you can certainly come up with reasons to pay a round trip.  the infrastructure 
then can make changes and each system magically picks them up.  its the reason 
we don't ship /etc/hosts files around anymore.

all that said, this issue can definitely be handled better than it is.
A couple options:

a.) cloud-init could use manage_etc_hosts=localhost on platforms it
knows will not provide dns lookup (this though coudl change, and
probably should change on lxd, and then cloud-init has to be updated to
accomodate... it gets tricky to service that logic if it ever changes as
customers will use different versions of lxd).

b.) libnss-myhostname might be able to help.  that is mentioned by xnox
in a related bug bug 1730744.

More conversation took place in IRC at
https://irclogs.ubuntu.com/2018/01/04/%23ubuntu-server.html#t14:57

** Also affects: cloud-init
   Importance: Undecided
       Status: New

** Changed in: cloud-init
       Status: New => Confirmed

** Changed in: cloud-init (Ubuntu)
       Status: New => Confirmed

** Also affects: cloud-images
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1741277

Title:
  Not all platforms running cloud-init end up with the system hostname
  resolveable by default

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1741277/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to