fix(deploy): halkyon.li's heavy sidecars started after every boot (ADR 0039, D6)
A reboot or a power cut between 01:55 and 05:00 left them stopped until the next morning: halkyon-morning.timer now also fires two minutes after boot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
71cc1cac5d
commit
086b980947
2 changed files with 20 additions and 2 deletions
|
|
@ -1,11 +1,15 @@
|
||||||
# halkyon-morning.service at 05:00:00 daily (ADR 0039, D6). As
|
# halkyon-morning.service at 05:00:00 daily (ADR 0039, D6), and two minutes after every
|
||||||
|
# boot: a reboot or a power cut inside the window would otherwise leave the heavy sidecars
|
||||||
|
# stopped (unless-stopped keeps a stopped container so) until the next morning. The
|
||||||
|
# runner's own timer never catches up after a boot, so they don't meet. As
|
||||||
# /etc/systemd/system/halkyon-morning.timer, enabled with
|
# /etc/systemd/system/halkyon-morning.timer, enabled with
|
||||||
# `systemctl enable --now halkyon-morning.timer`.
|
# `systemctl enable --now halkyon-morning.timer`.
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=halkyon.li: night.sh start at 05:00:00
|
Description=halkyon.li: night.sh start at 05:00:00 and after boot
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnCalendar=*-*-* 05:00:00
|
OnCalendar=*-*-* 05:00:00
|
||||||
|
OnBootSec=2min
|
||||||
Persistent=false
|
Persistent=false
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,20 @@ void main() {
|
||||||
expect(setting(evening, 'ExecStart'), contains('night.sh stop'));
|
expect(setting(evening, 'ExecStart'), contains('night.sh stop'));
|
||||||
expect(setting(morning, 'ExecStart'), contains('night.sh start'));
|
expect(setting(morning, 'ExecStart'), contains('night.sh start'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('starts the heavy sidecars after every boot too', () {
|
||||||
|
// A reboot or a power cut between 01:55 and 05:00 would otherwise leave them
|
||||||
|
// stopped (unless-stopped keeps a stopped container so) until the next morning;
|
||||||
|
// the runner's own timer never catches up, so nothing clashes with it.
|
||||||
|
expect(
|
||||||
|
setting(read('deploy/runner/halkyon-morning.timer'), 'OnBootSec'),
|
||||||
|
isNotNull,
|
||||||
|
);
|
||||||
|
expect(
|
||||||
|
setting(read('deploy/runner/forgejo-runner.timer'), 'Persistent'),
|
||||||
|
'false',
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue