unattended-upgrades: install the package, then check it actually does anything #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "unattended-upgrades-blacklist"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The role installed
unattended-upgradesand stopped. Whether unattendedupgrades then happened was left to the distribution: on Debian the periodic
runs depend on APT::Periodic, which the package does not necessarily set. So a
host in
autopatchedcarried a claim nobody had verified - the same shape asfail2ban-basicstarting a service and never noticing it exited a secondlater.
It now writes /etc/apt/apt.conf.d/52-castrum-unattended-upgrades, and then
reads
apt-config dumpback and asserts APT parsed it. An apt.conf file with asyntax error is ignored silently, which is precisely the failure the file
exists to prevent, so writing it is not evidence that it works.
unattended_upgrades_package_blacklistis what prompted this. A host whosestorage is a DKMS module cannot take unattended kernel upgrades: the ODROID
vendor kernels keep one release string across every point release, so
/lib/modules// is reused, DKMS reports "installed", skips the rebuild,
and leaves a module compiled against a kernel that no longer exists. Where root
is a normal filesystem that does not stop the boot - the host returns looking
healthy with its pool unimported and its data absent. Measured: a zfs.ko dated
September 2025 sitting under a kernel built in July 2026, with matching
vermagic, which DKMS reported as installed.
The regex in the verification is single-backslash on purpose. In a YAML folded
scalar
\\sreaches the regex as a literal backslash and matches nothing;\sis what works. Proven both ways against known-good and known-badapt-config output before this landed.
Claude-Session: https://claude.ai/code/session_01W5FkkabPcwgqKTQv4LD7DP