From 469e9185dd34a6e89c69f288205187d3ff06f96b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 10 Dec 2024 16:17:52 -0500 Subject: [PATCH] timer: Import defaults from systemd-sysupdate.timer Inspired by https://github.com/coreos/rpm-ostree/pull/5183/commits/db108a30fe94929bcab7313e0224faccde5edc0d Signed-off-by: Colin Walters --- systemd/bootc-fetch-apply-updates.timer | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/systemd/bootc-fetch-apply-updates.timer b/systemd/bootc-fetch-apply-updates.timer index 4ebb66362..e1126a449 100644 --- a/systemd/bootc-fetch-apply-updates.timer +++ b/systemd/bootc-fetch-apply-updates.timer @@ -1,14 +1,23 @@ [Unit] Description=Apply bootc updates Documentation=man:bootc(8) +# TODO: Tweak this to more strongly conditionalize on using +# bootc for host updates. ConditionPathExists=/run/ostree-booted [Timer] +# This is copied from systemd-sysupdate.timer; it's just an arbitrary +# starting point. +# +# Trigger the update 1 hour after boot, and then – on average – every 6h, but +# randomly distributed in a 2h…6h interval. In addition trigger things +# persistently once on each Saturday, to ensure that even on systems that are +# never booted up for long we have a chance to do the update. OnBootSec=1h -# This time is relatively arbitrary and obviously expected to be overridden/changed -OnUnitInactiveSec=8h -# When deploying a large number of systems, it may be beneficial to increase this value to help with load on the registry. -RandomizedDelaySec=2h +OnUnitActiveSec=2h +OnCalendar=Sat +RandomizedDelaySec=4h +Persistent=yes [Install] WantedBy=timers.target