resolve service in nsswitch.conf adds 25 seconds to failed lookups before systemd-resolved is up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
D-Bus |
Unknown
|
Unknown
|
|||
cloud-init |
Fix Released
|
High
|
Unassigned | ||
cloud-init (Ubuntu) |
Fix Released
|
Critical
|
Scott Moser | ||
Xenial |
Confirmed
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned | ||
dbus (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
In cases where cloud-init used dns during early boot and system was
configured in nsswitch.conf to use systemd-resolvd, the system would
timeout on dns attempts making system boot terribly slow.
[Test Case]
Boot a system on GCE.
check for WARN in /var/log/messages
check that time to boot is reasonable (<30 seconds). In failure case the
times would be minutes.
[Regression Potential]
Changing order in boot can be dangerous. There is real chance for
regression here, but it should be fairly small as xenial does not include
systemd-resolved usage. This was first noticed on yakkety where it did.
[Other Info]
It seems useful to SRU this in the event that systemd-resolvd is used
on 16.04 or the case where user upgrades components (admittedly small use
case).
=== End SRU Template ===
During boot, cloud-init does DNS resolution checks to if particular metadata services are available (in order to determine which cloud it is running on). These checks happen before systemd-resolved is up[0] and if they resolve unsuccessfully they take 25 seconds to complete.
This has substantial impact on boot time in all contexts, because cloud-init attempts to resolve three known-invalid addresses ("does-
This means that yakkety is consistently taking 2-3 minutes to boot on EC2 and GCE, compared to the ~30 seconds of the first boot and ~10 seconds thereafter in xenial.
Related branches
- Martin Pitt (community): Approve
- cloud-init Commiters: Pending requested
-
Diff: 44 lines (+4/-6)2 files modifiedsystemd/cloud-init-local.service (+2/-2)
systemd/cloud-init.service (+2/-4)
- Ryan Harper: Approve
-
Diff: 13 lines (+1/-1)1 file modifiedsystemd/cloud-init.service (+1/-1)
Changed in cloud-init (Ubuntu): | |
assignee: | nobody → Dan Watkins (daniel-thewatkins) |
Changed in cloud-init: | |
status: | New → Fix Committed |
importance: | Undecided → High |
Changed in cloud-init (Ubuntu): | |
status: | Fix Released → In Progress |
Changed in dbus (Ubuntu): | |
status: | Triaged → In Progress |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Yakkety): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
status: | Confirmed → Fix Released |
Changed in dbus (Ubuntu Xenial): | |
status: | New → Invalid |
Changed in dbus (Ubuntu Yakkety): | |
status: | New → Invalid |
no longer affects: | dbus (Ubuntu Xenial) |
no longer affects: | dbus (Ubuntu Yakkety) |
description: | updated |
Changed in dbus (Ubuntu): | |
milestone: | ubuntu-16.11 → none |
Document with testing details