Replies: 1 comment
-
|
I agree with the conclusion, does not make sense for us right now |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Idea
The
system_updaterole ships a hand-writtenupdate-and-rebootscript that applies all updates, decides whether a reboot is needed, sets an Icinga downtime, and reboots. Red Hat (dnf-automatic) and Debian (unattended-upgrades) both ship native, distro-maintained auto-updaters. Could we drop the custom script and delegate the core mechanics to these tools, keeping only our orchestration glue?Possible solution
Use the native tool as the update/reboot engine and reattach our extras through its extension points:
dnf-automatic.conf:apply_updates = yes,reboot = when-needed,upgrade_type = default, plusreboot_commandand acommand_emailemitter pointing at wrapper scripts.unattended-upgrades:Automatic-Reboot "true",Automatic-Reboot-Time,Origins-Patternfor the security case,Mailfor notifications.kill httpd/apache2: on RHEL viareboot_command, on Debian viaDPkg::Post-Invokeor a systemd drop-in (no reboot-command hook exists there).pre_update_code/post_update_code, AIDE update, rpmnew/rpmsave detection: systemdExecStartPre/ExecStartPostdrop-ins.Pros
upgrade_type = security(RHEL) and securityOrigins-Pattern(Debian).Cons (findings from inspecting the installed and upstream source)
needs-restartingwithout flag on RHEL,needrestart -pon Debian). The native tools do not do this.dnf-automatic'sreboot_needed()is a hardcoded package allowlist (9 packages on RHEL 8/9's dnf4 4.14:kernel,kernel-rt,glibc,linux-firmware,systemd,dbus,dbus-broker,dbus-daemon,microcode_ctl; a couple more upstream), checked only against the names changed in the transaction.unattended-upgradesonly checks for the/var/run/reboot-requiredflag, with noneedrestartintegration and a hardcodedshutdown -r(no reboot-command hook). An OpenSSL, glib2 or zlib update that running daemons link would not trigger a reboot under either tool. Security-relevant, not cosmetic.apply -> notify -> rebootsequence with the reboot triggered internally at the very end. AIDE update, rpmnew/rpmsave handling andpost_update_codehave to run before the reboot, so they end up split acrossreboot_command(only runs when a reboot happens) andExecStartPost, which introduces a reboot-timing race.dnf-automaticoffers a configurablereboot_command;unattended-upgradeshardcodesshutdown -r <time>with no command hook. The orchestration glue would have to be wired up through different mechanisms per distro.dnf-automaticfilters by security advisory metadata, whereas our security lane isolates a dedicated frozensecurityrepository via--disablerepo/--enablerepo. Not a drop-in equivalent.Conclusion (current lean: negative)
Replacing
update-and-rebootwholesale looks like a net negative. To keep today's reboot coverage we would have to disable the native reboot feature and keep our own reboot decision plus orchestration in a wrapper, at which point the wrapper is essentially the current script minus its oneyum update/apt upgradeline, in exchange for an extra dependency and more moving parts. The only genuinely attractive target is the security lane, and even there the advisory-versus-repo-isolation difference needs a closer look. Posting this to capture the analysis and gather other opinions before anyone reinvestigates.Beta Was this translation helpful? Give feedback.
All reactions