Consider the following timer unit:

[Unit]
Description=test timer

[Timer]
OnCalendar=*-*-* *:*:00/10

Combine this with the following service:

[Unit]
Description=test timer test unit
ConditionACPower=true

[Service]
ExecStart=/bin/true

The unit is started every 10 seconds as expected. However, when AC is
unplugged, the timer gets stuck in state TIMER_RUNNING and does not
return to TIMER_WAITING, according to systemctl status. From that point
on, the timer is not triggered again.

The reason seems to be that in unit.c, lines 1057-1065, the service is
treated as if it is already starting and the timer is not notified of
the failure. I am not familiar enough with systemd internals to propose
a fix.

Regards
Thomas

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to