[systemd-devel] timer "OnBootSec=15m" not triggering
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Mon Mar 7 09:22:32 UTC 2022
Hi!
I wrote some services that should run when booting and some time after
booting.
As it seems the service to run during boot works, but the timer-triggered one
does not.
I have no idea why.
Here are the details:
# systemctl status prevent-fencing-loop.service
● prevent-fencing-loop.service - Prevent Pacemaker Fencing-Loop
Loaded: loaded (/usr/lib/systemd/system/prevent-fencing-loop.service;
enabled; vendor preset: disabled)
Active: inactive (dead) since Sat 2022-03-05 10:33:50 CET; 1 day 23h ago
Docs: man:boot-loop-handler(8)
Main PID: 5226 (code=exited, status=0/SUCCESS)
Mar 05 10:33:50 h19 systemd[1]: Starting Prevent Pacemaker Fencing-Loop...
Mar 05 10:33:50 h19 boot-loop-handler[5234]: 1 of 4 allowable boots
Mar 05 10:33:50 h19 systemd[1]: prevent-fencing-loop.service: Succeeded.
Mar 05 10:33:50 h19 systemd[1]: Finished Prevent Pacemaker Fencing-Loop.
So this service ran during boot.
# systemctl status reset-boot-counter.timer
● reset-boot-counter.timer - Reset Boot-Counter after 15 minutes
Loaded: loaded (/usr/lib/systemd/system/reset-boot-counter.timer;
enabled; vendor preset: disabled)
Active: inactive (dead)
Trigger: n/a
Triggers: ● reset-boot-counter.service
Docs: man:boot-loop-handler(8)
So my guess is the timer never triggered, and the service was never started:
# systemctl status reset-boot-counter.service
● reset-boot-counter.service - Reset Boot-Counter for detecting Fencing-Loop
Loaded: loaded (/usr/lib/systemd/system/reset-boot-counter.service;
static)
Active: inactive (dead)
Docs: man:boot-loop-handler(8)
The timer is:
# systemctl cat reset-boot-counter.timer
# /usr/lib/systemd/system/reset-boot-counter.timer
[Unit]
Description=Reset Boot-Counter after 15 minutes
Documentation=man:boot-loop-handler(8)
[Timer]
OnBootSec=15m
AccuracySec=1s
[Install]
WantedBy=timer.target
----------------
"systemd-analyze verify" finds no problems.
systemd being used is that of SLES15 SP3 (probably also openSUSE LEap 15.3)
(systemd-246.16-150300.7.39.1.x86_64)
Regards,
Ulrich
More information about the systemd-devel
mailing list