From 9535e802b514ec99d889a1627095350576ff420e Mon Sep 17 00:00:00 2001 From: Nayden Petrov Date: Thu, 29 Oct 2026 07:59:46 +0200 Subject: [PATCH] Remove hardcoded Cache=yes from bosh_systemd_resolved stage The resolved-cache.conf drop-in hardcodes Cache=yes for all stemcells with no operator control. bosh-agent now writes Cache= into its own 10-bosh.conf drop-in (env.bosh.systemd_resolved.cache), defaulting to yes, so the stemcell file is redundant. Remove the asset and the cp line that installs it, and drop the corresponding spec assertion. --- bosh-stemcell/spec/os_image/ubuntu_spec.rb | 4 ---- stemcell_builder/stages/bosh_systemd_resolved/apply.sh | 1 - .../stages/bosh_systemd_resolved/assets/resolved-cache.conf | 2 -- 3 files changed, 7 deletions(-) delete mode 100644 stemcell_builder/stages/bosh_systemd_resolved/assets/resolved-cache.conf diff --git a/bosh-stemcell/spec/os_image/ubuntu_spec.rb b/bosh-stemcell/spec/os_image/ubuntu_spec.rb index f058385edf..95a8d57aa9 100644 --- a/bosh-stemcell/spec/os_image/ubuntu_spec.rb +++ b/bosh-stemcell/spec/os_image/ubuntu_spec.rb @@ -551,9 +551,5 @@ describe file("/etc/systemd/resolved.conf.d/add-container-listener-address.conf") do its(:content) { should match(/DNSStubListenerExtra=169\.254\.0\.53/) } end - - describe file("/etc/systemd/resolved.conf.d/resolved-cache.conf") do - its(:content) { should match(/Cache=yes/) } - end end end diff --git a/stemcell_builder/stages/bosh_systemd_resolved/apply.sh b/stemcell_builder/stages/bosh_systemd_resolved/apply.sh index 64445bb595..1980d29674 100755 --- a/stemcell_builder/stages/bosh_systemd_resolved/apply.sh +++ b/stemcell_builder/stages/bosh_systemd_resolved/apply.sh @@ -8,7 +8,6 @@ source $base_dir/lib/prelude_bosh.bash mkdir -p "${chroot}/etc/systemd/resolved.conf.d/" cp "$(dirname "$0")/assets/add-container-listener-address.conf" "${chroot}/etc/systemd/resolved.conf.d/" -cp "$(dirname "$0")/assets/resolved-cache.conf" "${chroot}/etc/systemd/resolved.conf.d/" cp "$(dirname "$0")/assets/create-systemd-resolved-listener-address.service" "${chroot}/lib/systemd/system/" run_in_chroot "${chroot}" "systemctl enable create-systemd-resolved-listener-address.service" diff --git a/stemcell_builder/stages/bosh_systemd_resolved/assets/resolved-cache.conf b/stemcell_builder/stages/bosh_systemd_resolved/assets/resolved-cache.conf deleted file mode 100644 index ff162082f2..0000000000 --- a/stemcell_builder/stages/bosh_systemd_resolved/assets/resolved-cache.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Resolve] -Cache=yes