[systemd-devel] systemd-218 - Requisite implies TriggeredByRestartOf

Lennart Poettering lennart at poettering.net
Mon May 18 16:26:46 PDT 2015

On Tue, 19.05.15 00:55, Lennart Poettering (lennart at poettering.net) wrote:

> On Thu, 14.05.15 21:23, Evert (evert.gentoo at planet.nl) wrote:
> > Hi,
> > 
> > According to the systemd documentation, Requisite disallows starting a
> > unit unless the specified unit has been started. This seems to work
> > fine, however, if the specified unit has been restarted, this unit will
> > be started too!
> > This is not what should happen and it doesn't happen with a stop and
> > start of the specified unit, so clearly, restart behaves different than
> > stop followed by start.
> Hmm, I figure this is a bug in systemd.
> Whenever you have a unit A declare a Requisite= on a unit B then this
> will actually create two dependencies: the actual Requisite= one plus
> one in the opposite direction, of type RequiredBy=. Dependencies of
> type "RequiredBy=" are mostly internal to systemd, you cannot
> configure them directly (though you can query them using "systemctl
> show"). They are used to track down what to stop when we get
> "systemctl stop" by the user. Now, as a special shortcut we currently map
> "Requisite=" and "Required=" to a reverse dependency of
> "RequiredBy=", which is problematichere, since we'll hence make no
> distinction between the two when processing "systemctl stop".
> I figure we need to split up the reverse dep here, and introduce a
> seperate RequisiteBy= dependency so that we can avoid this problem...

Fixed in git. Please verify.


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list