[systemd-devel] Services with multiple pre-requisites

Lennart Poettering lennart at poettering.net
Tue Dec 22 14:03:15 UTC 2020


On Mo, 21.12.20 21:18, Andrei Borzenkov (arvidjaar at gmail.com) wrote:

> You miss ordering dependencies. Neither Requires not Requisite work
> without proper After/Before.
>
> systemd manuals make impression that dependencies are between units.
> This is wrong - dependencies are between jobs. If unit B has "Requisite:

Dependencies are declared between units, it's the only concept we have
that gets a declaration, in form of a unit file.

Requirement dependencies such as Wants=, Requires= and so on affect
which units are pulled into the job queue. After that they have zero
effect on jobs. They synthesize jobs if you so will. Hnce what you are
saying makes no sense.

Ordering deps like any kind of dep are also declared between units,
and they affect the ordering in which the jobs are dispatched. But
given that there can be exactly 0 or 1 jobs per unit, i.e. either a
unit is in the job queue or it isn't, the distinction between jobs and
units is very technical, and if you ask me not too relevant for
readers.

Hence, I don't agree with your criticism. Insisting on the existance
of the job concept to explain ordering deps doesn't help.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list