systemd-resolved default config for Caching is still "yes"

Bug #1895418 reported by Cameron Steel
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Low
Dan Streetman
Groovy
Fix Released
Undecided
Unassigned

Bug Description

[impact]

/etc/systemd/resolved.conf file indicates the default value for 'Cache=' is 'yes', but the actual default is 'no-negative'

[test case]

$ grep Cache /etc/systemd/resolved.conf
#Cache=yes

With the version of the package from -proposed it'll be "#Cache=no-negative".

[regression potential]

any regression would likely result in a mismatch between the commented default value of the Cache parameter and the actual build-time default value, or possibly a problem while systemd-resolved is parsing the resolved.conf file.

[scope]

this is needed only in focal.

this was changed already in groovy as indicated in comment 1.

bionic and earlier still use 'yes' as the default value of Cache=, which matches the resolved.conf file.

[original description]

Back in December, the default for systemd-resolved caching in Ubuntu systemd was changed to "no-negative" from the upstream default "yes" [0]

In this change, the default value in the resolved.conf file was missed. As the defaults in this file are commented, the effective default is still "no-negative", however when viewing the config file, the commented default "yes" is at odds with the man page resolved.conf(5), which correctly states the default as "no-negative".

This was an issue for me as I set DNSSEC to "yes", and expected Caching to also be "yes". Running DNSSEC with the default "no-negative" Caching is detrimental to performance resolving unsigned zones, as the non-existence of DNSSEC RRs must be looked up every time.

The issue with the intersection of DNSSEC and Caching is for upstream, but the least that needs to be done here is updating the resolved.conf template with "Caching=no-negative" to match the man page and behaviour, and perhaps even adding a note to the "DNSSEC=" section of resolved.conf(5) that Caching should be enabled. Now that I'm looking at that man page, the default for DNSSEC is also listed as "allow-downgrade", whereas the default for Ubuntu is "no".

[0] https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=b42658843a9496d6b6bb68ac159f2a9f0a8ba9db&h=ubuntu-focal

Revision history for this message
Dan Streetman (ddstreet) wrote :
Changed in systemd (Ubuntu Groovy):
status: New → Fix Committed
Dan Streetman (ddstreet)
Changed in systemd (Ubuntu Focal):
assignee: nobody → Dan Streetman (ddstreet)
importance: Undecided → Low
status: New → In Progress
Dan Streetman (ddstreet)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 246.6-1ubuntu1

---------------
systemd (246.6-1ubuntu1) groovy; urgency=medium

  [ Dan Streetman ]
  * Fix resolved.conf Cache= default to match default (LP: #1895418)
    Files:
    - debian/patches/lp1895418.patch
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=dd4d93d94ebe2cf416f6b5a5eb59a16432cbc47b

  [ Balint Reczey ]
  * Bugfix-only upload
  * Merge from Debian unstable
    - core: propagate unit start limit hit state to triggering path unit (LP: #1891657)
  * Skip test_rsyslog in s390x containers.
    The test is failing almost all the time. (LP: #1895576)
    File: debian/tests/boot-and-services
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=ff8d286de52daa8b0856213ae52e66b81474fb57
  * debian/tests/tests-in-lxd: Don't create the lxd test image twice
    File: debian/tests/tests-in-lxd
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=e858e7c41b84bc4c34e8af79d6e4b6114fe23952

systemd (246.6-1) unstable; urgency=medium

  * New upstream version 246.6
  * Rebase patches

 -- Balint Reczey <email address hidden> Thu, 24 Sep 2020 21:27:11 +0200

Changed in systemd (Ubuntu Groovy):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Cameron, or anyone else affected,

Accepted systemd into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/245.4-4ubuntu3.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in systemd (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Cameron Steel (tugzrida) wrote :

Testing systemd 245.4-4ubuntu3.3 on Focal, I can verify that the default value of the "Cache" directive is "no-negative" in the man page, default config file, and actual program behaviour.

While doing this, I was reminded that the default value of the "DNSSEC" directive is "no" in both the default config file and program behaviour, however the man page lists the default as "allow-downgrade". As a user looking to change this setting would do so by editing the config file anyway, I don't personally think this is of great importance to fix.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (systemd/245.4-4ubuntu3.3)

All autopkgtests for the newly accepted systemd (245.4-4ubuntu3.3) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

linux-hwe-5.8/5.8.0-25.26~20.04.1 (armhf)
python-dbusmock/0.19-1 (armhf)
lxc/1:4.0.2-0ubuntu1 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#systemd

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for systemd has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 245.4-4ubuntu3.3

---------------
systemd (245.4-4ubuntu3.3) focal; urgency=medium

  [ Rafael David Tinoco ]
  * d/p/lp1861941-dont-generate-disk-byuuid-for-bcache-uuid.patch:
    Reworded and reintroduced patch to fully explain delta is NOT a fix to
    LP: #1861941 if the bcache-tools patch exists, but should be kept anyway
    as the change makes sense for a better experience to end user.
    (LP: #1861941)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=f8f64b3b58a04a83b1c426818b9affc41e0bff6c

  [ Dan Streetman ]
  * d/p/lp1882596-man-fix-some-manvolnum.patch:
    - fix some man section references (LP: #1882596)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=3959ec95eff78d38ec4409807f151572afe83fe9
  * d/p/lp1895418-correct-resolved-conf-cache-default.patch:
    - fix resolved.conf default Cache= value (LP: #1895418)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=ebe274a2b01658ee39b372d7033c35209510b028
  * d/p/lp1897744-resolve-enable-RES_TRUSTAD-towards-the-127.0.0.53-st.patch:
    - add resolv.conf 'trust-ad' option (LP: #1897744)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=f6acc8c620b80adab7b048352d85e722b5ba8214
  * d/t/*:
    - Update tests to fix false negatives (LP: #1892358)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=cee6c31a6caec7888270c9fa8757105ab950ed0c
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=a1c1a2bb0ff27faf84fe94583631dfd0f1f4ed8f
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=9417ce996766c133c2a33d4102ce1494f3166774

 -- Dan Streetman <email address hidden> Thu, 08 Oct 2020 16:14:56 -0400

Changed in systemd (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.