[systemd-devel] difference in restart behavior between 219 and 220?

Andrei Borzenkov arvidjaar at gmail.com
Thu Jul 9 20:23:57 PDT 2015


В Thu, 9 Jul 2015 14:56:55 -0700
Vadim Berezniker <vadim at berezniker.com> пишет:

> Hello,
> 
> I have a scenario where a service restarts after a dependency failure
> in 219, but not in 220.
> I'm wondering if it's a systemd issue or a problem with my configuration.
> 
> I've created a simple, but somewhat contrived repro.
> Service A fails on first attempt, gets restarted and succeeds.
> Service B depends on service A.
> I attempt to start service B.
> 
> In systemd 219, B gets restarted when A succeeds, but in 220 B remains failed.

What do you mean "B is restarted"? B cannot be restarted in your case
because B is not yet started at this point. 

Sounds like this is this commit:

commit c6497ccb7153af9a1252c48918e380b5134314de
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue May 19 18:13:22 2015 +0200

    core: when propagating restart requests due to deps, downgrade restart to try-restart
    
    Previously, if a service A depended on a service B via Requires=, and A
    was not running and B restarted this would trigger a start of A as well,
    since the restart was propagated as restart independently of the state
    of A.
    
    This patch ensures that a restart of B would be propagated as a
    try-restart to A, thus not changing its state if it isn't up.
    
    http://lists.freedesktop.org/archives/systemd-devel/2015-May/032061.html

Does reverting it change anything?


More information about the systemd-devel mailing list