[SRU] systemd-resolved negative caching for extended period of time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
New
|
Unknown
|
|||
systemd (Ubuntu) |
Fix Released
|
High
|
Jorge Niedbalski | ||
Bionic |
Fix Released
|
High
|
Jorge Niedbalski | ||
Disco |
Fix Released
|
High
|
Jorge Niedbalski | ||
Eoan |
Fix Released
|
High
|
Jorge Niedbalski |
Bug Description
[Impact]
* If a DNS lookup returns SERVFAIL, systemd-resolved seems to cache the result for very long (infinity?). I have to restart systemd-resolved to have the negative caching purged.
* After SERVFAIL DNS server issue has been resolved, chromium/firefox still returns DNS error despite host can correctly resolve the name.
[Test Case]
* If a lookup returns SERVFAIL systemd-resolved will cache the result for 30s (See 201d995),
however, there are several use cases on which this condition is not acceptable (See #5552 comments)
and the only workaround would be to disable cache entirely or flush it , which isn't optimal.
* Configure /etc/systemd/
Cache=yes (default)
* Restart systemd-resolved (systemctl restart systemd-
* Run a host/getent command against a entry that will return SERVFAIL and check the journalctl output to see that the reply gets served from cache.
root@systemd-
Host www.montemar.cl not found: 2(SERVFAIL)
root@systemd-
-- Logs begin at Fri 2019-07-12 18:09:42 UTC, end at Tue 2019-07-23 15:10:17 UTC. --
Jul 23 15:10:10 systemd-disco systemd-
Jul 23 15:10:10 systemd-disco systemd-
Jul 23 15:10:10 systemd-disco systemd-
Jul 23 15:10:17 systemd-disco systemd-
Jul 23 15:10:17 systemd-disco systemd-
Jul 23 15:10:17 systemd-disco systemd-
Jul 23 15:10:17 systemd-disco systemd-
Jul 23 15:10:17 systemd-disco systemd-
Jul 23 15:10:17 systemd-disco systemd-
Jul 23 15:10:17 systemd-disco systemd-
[Regression Potential]
* The default options (Yes/No) will remain as default Yes, behaving in the same original
way, by setting it to no-negative any negative answer will be skipped
from being cached.
* No regression potential has been detected as this just introduces
a new possible option for the Cache configuration directive.
[Fix]
With the cache option set to 'no-negative', negative DNS answers
are entirely avoided to being cached.
root@systemd-
Host www.metaklass.org not found: 2(SERVFAIL)
* Look at the systemd-resolved entries
root@systemd-
-- Logs begin at Fri 2019-07-12 18:09:42 UTC, end at Fri 2019-07-12 18:48:31 UTC. --
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
Jul 12 18:48:31 systemd-disco systemd-
The following patch https:/
[Other Info]
Note that systemd in Eoan is being upgraded to upstream 242, so I am not adding this to Eoan now, as I don't want to disturb the merge. If needed after the merge, I'll add to Eoan.
Related branches
- Robert Ancell (community): Approve
- Shih-Yuan Lee (community): Needs Resubmitting
- Dimitri John Ledkov: Pending requested
-
Diff: 432 lines (+392/-0)6 files modifieddebian/changelog (+33/-0)
debian/patches/hwdb-revert-airplane-mode-keys-handling-on-Dell.patch (+33/-0)
debian/patches/lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch (+229/-0)
debian/patches/lp1833671-networkd-keep-bond-slave-up-if-already-attached.patch (+50/-0)
debian/patches/lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch (+43/-0)
debian/patches/series (+4/-0)
Changed in systemd: | |
status: | Unknown → New |
Changed in systemd (Ubuntu): | |
assignee: | nobody → Jorge Niedbalski (niedbalski) |
Changed in systemd (Ubuntu Disco): | |
assignee: | nobody → Jorge Niedbalski (niedbalski) |
Changed in systemd (Ubuntu Bionic): | |
assignee: | nobody → Jorge Niedbalski (niedbalski) |
Changed in systemd (Ubuntu Xenial): | |
assignee: | nobody → Jorge Niedbalski (niedbalski) |
status: | New → In Progress |
Changed in systemd (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Disco): | |
status: | New → In Progress |
Changed in systemd (Ubuntu Disco): | |
importance: | Undecided → High |
Changed in systemd (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in systemd (Ubuntu Xenial): | |
importance: | Undecided → High |
tags: | added: sts sts-sru-needed |
description: | updated |
tags: | added: sts-sponsor sts-sponsor-ddstreet |
description: | updated |
no longer affects: | systemd (Ubuntu Xenial) |
tags: | removed: sts-sponsor-ddstreet |
Changed in systemd (Ubuntu Eoan): | |
status: | Fix Committed → In Progress |
Changed in systemd (Ubuntu Eoan): | |
status: | In Progress → Fix Committed |
tags: |
added: sts-sru-done removed: sts-sru-needed |
tags: | removed: sts-sponsor |
tags: | added: ddstreet eoan systemd |
description: | updated |
Changed in systemd (Ubuntu): | |
status: | In Progress → Fix Released |
tags: | removed: ddstreet |
tags: | removed: sts |
I believe this should be filed upstream instead.