[systemd-devel] Dependency on timers.target

Lennart Poettering lennart at poettering.net
Wed May 13 10:42:33 PDT 2015


On Thu, 07.05.15 11:26, Bas van Dijk (v.dijk.bas at gmail.com) wrote:

> Hello,
> 
> I have a systemd timer (sensors-logger.timer) which requires another
> service (carbonCache.service) to be active:
> 
>   [Unit]
>   Requires=carbonCache.service
>   After=carbonCache.service
>   Description=Log hardware sensors to graphite.
> 
>   [Timer]
>   OnCalendar=*-*-* *:*:00
> 
> I noticed the following systemd warnings in my journal:
> 
>   Found ordering cycle on basic.target/start
>   Found dependency on timers.target/start
>   Found dependency on sensors-logger.timer/start
>   Found dependency on carbonCache.service/start
>   Found dependency on basic.target/start
>   Breaking ordering cycle by deleting job timers.target/start
>   Job timers.target/start deleted to break ordering cycle
>     starting with basic.target/start
>   Found ordering cycle on basic.target/start
>   Found dependency on timers.target/start
>   Found dependency on sensors-logger.timer/start
>   Found dependency on carbonCache.service/start
>   Found dependency on basic.target/start
>   Unable to break cycle
>   Requested transaction contains an unfixable cyclic
>     ordering dependency: Transaction order is cyclic.
>       See system logs for details.
> 
> Apparantly timers.target has a dependency on
> sensors-logger.timer. However I didn't specify this. Is this
> done automatically by systemd? 

Yes, timers are by default ordered before timers.target.

> If so, is it possible to
> disable this and is it wise to do so?

Set DefaultDependencies=no in the timer unit to turn this off.

It should be OK to turn this off.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list