[systemd-devel] Timer units fail when conditions fail
Lennart Poettering
lennart at poettering.net
Tue Feb 12 18:38:47 PST 2013
On Mon, 11.02.13 15:20, Thomas Bächler (thomas at archlinux.org) wrote:
> 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.
Hmm, indeed. There's a missing connection between unit_start() failing
and timer_unit_notify()...
I added this to the todo list now, to get fixed...
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list