[systemd-devel] Requires and After

James Feeney james at nurealm.net
Thu Jan 3 03:22:52 UTC 2019


On 1/2/19 5:38 PM, Tom H wrote:
>> Some developers and some users are not native English speakers. In
>> some cases, systemd terminology can be ... less than optimal, while,
>> in other situations, users will simply misunderstand the conventional
>> meaning of words.

> You might not like how "Requisite=" is defined in systemd but that
> doesn't mean that it's wrong or "less than optimal."

Sorry, I did not mean to imply that *I* had an issue with the term "Requisite".

Personally, my "pet peeve" is with the use of the term "Dead" to refer to units which are in an inactive state but which will become active in the future, as, for instance, logrotate.service.  These states may be viewed with "systemctl list-units".  For me, "dead" connotes a permanent state, in the same sense as "failed", in contrast to the terms "dormant", "sleeping", or "suspended".  Something "dormant" may re-awaken.  Something that is "dead" is not going to "wake-up" again - except in horror movies.

I can only guess that Lennart wanted to create a more robust "hommage" to horror movies than that provided by the unix term "zombie".  A unix zombie process has no chance of being re-animated.


> What Reindl Harald was saying was that "Requires" should have an
> implicit "After" because it wouldn't make sense for a.service to
> require b.service but to start before b.service.

I understand that Reindl has said that.  But, just because Reindl does not have a use case in which a.service requires b.service *and* also starts before b.service, is no reason to prohibit other people from configuring such a use case.  That would be the purview of religious zealots and political fundamentalists.

Reindl might be uncomfortable with other people being "insane" and acting with "wild and crazy abandon", but, ... well, it's a big world out there.

In my case, for instance, I have a service unit which I use, in combination, to configure hot-plug network interfaces.  The service unit makes use of a target unit to sequence stages in the configuration process.  This service unit Requires the target unit *and* must be run *Before* the target unit.

With accumulated experience, people will learn new ways to use their tools.  It's just going to take time.

> You could even replace "Wants=" by "Requires=" if a.service can launch
without b.service being up but cannot function without b.service being
up.

Often, the reason to choose between Wants= and Requires= is based upon the way units must be shut-down, not because of the way they start-up.


More information about the systemd-devel mailing list