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

Lennart Poettering lennart at poettering.net
Tue May 19 09:20:39 PDT 2015

On Tue, 19.05.15 17:13, Uoti Urpala (uoti.urpala at pp1.inet.fi) wrote:

> On Tue, 2015-05-19 at 14:06 +0200, Lennart Poettering wrote:
> > On Tue, 19.05.15 14:15, Uoti Urpala (uoti.urpala at pp1.inet.fi) wrote:
> > > As for Evert's original problem, I think it's that RESTART is propagated
> > > to all RequiredBy units unconditionally - even if those are currently
> > > stopped! This affects both Requires= and Requisite= in exactly the same
> > Hmm, so basically you are saying that currently RESTART is propagated
> > as RESTART to all depending units, but you suggest that it should be
> > propagated as TRY_RESTART? Did I get this right?
> Yes, I think that should fix it.

OK, fixed in git. Seems to work now, according to my tests. Would be
thankful for a confirmation.

> I feel that a TRY_RESTART style true restart would be a more natural
> base operation than the current "either start or restart" one, with the
> START_OR_RESTART for "systemctl restart" semantics collapsing to either
> START or RESTART. With that terminology, the logic would simply be that
> RESTART is propagated, START is not.

Well, internally START_OR_RESTART is certainly the more complex one,
and TRY_RESTART the much simpler...

I figure this is API now in systemctl, hence in the public interface
we cannot change this either. Also, sysvinit introduced the
nomenclature, not us...

I am tempted to agree with you though that "systemctl restart" should
have been what "systemctl try-restart", but that's too late.



Lennart Poettering, Red Hat

More information about the systemd-devel mailing list