A convenient way to test this is to install libnss-resolve and cloud- init into a yakkety container. Then cloud-init will basically hang forever, looping on
2016-10-04 12:58:48,716 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [100/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance- id (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f2495137b38>: Failed to establish a new connection: [Errno 113] No route to host',))] and since cloud-init.service runs during early boot, not much else (dbus, resolved, etc.) has started at that time. During that, name resolution is indeed broken. I think nss-resolve should quickly fall back to DNS if D-Bus isn't running yet. ** Changed in: systemd (Ubuntu) Status: New => Triaged -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1629797 Title: resolve service in nsswitch.conf adds 25 seconds to failed lookups before systemd-resolved is up To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1629797/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs