4 ms·
> In which case you specify service dependencies and systemd will start them one after another, you know, you have the After= option in your units just for that
by alxlaz 4y ago
> In which case you specify service dependencies and systemd will start them one after another, you know, you have the After= option in your units just for that.
First off, After= specifies order, not functional dependency. This doesn't do what you want which, I think, kind of proves my point. The complaint in the original article (and mine) isn't that it's impossible to specify order between two services, which, yes, you can do just fine. The complaint is that doing so repeatably across boot times is impossible (because systemd literally and explicitly does not support it) and that debugging the "weak" version of it is really difficult.
It's really difficult because Aftter= is, literally, one twelfth of the story, possibly less. Order and dependency ae specified not just though After=, but also Before=, Wants=, Requires=, WantedBy=, RequiedBy=, Requisite=, RequisiteOf=, Triggers=, TriggeredBy=, PartOf= and ConsistsOf=.
Ordering and dependency are treated separately by systemd. I think that's a good design trade-off but it's not without consequences.