[systemd-devel] Ordering (apt) timer services to not run at the same time

Julian Andres Klode jak at debian.org
Fri Apr 28 09:05:38 UTC 2017


On Fri, Apr 28, 2017 at 08:46:45AM +0200, Michal Sekletar wrote:
> On Thu, Apr 27, 2017 at 11:30 PM, Julian Andres Klode <jak at debian.org> wrote:
> 
> > Now, we seem to be missing one bit: If daily-upgrade is already
> > running, and daily is about to start, daily should wait for
> > daily-upgrade to finish. I had hoped that maybe that works
> > automatically given that there is some ordering relation between the
> > two, but that did not work out. I tried adding Conflicts, but systemd
> > then said "loop to fast" and became unresponsive (not sure if caused
> > by this, but maybe).
> 
> After/Before dependencies ensure ordering between respective jobs in a
> transaction (actually between both jobs in a single transaction and
> between jobs that are already in run queue). However, ordering doesn't
> affect jobs that we've already dispatched, since they are already
> running we can't do much about them.

>From my testing, if B has After=A, and A is already started, the
startup of B is delayed until A has completed - do you mean that
with run queue, or is that merely by accident somehow?

> Indeed, seems like lockfile + condition in other unit is the simplest way out.

How unfortunate.

-- 
Debian Developer - deb.li/jak | jak-linux.org - free software dev
                  |  Ubuntu Core Developer |
When replying, only quote what is necessary, and write each reply
directly below the part(s) it pertains to ('inline').  Thank you.


More information about the systemd-devel mailing list