[systemd-devel] Restart sequence: "systemctl restart rsyslog.service syslog.socket" often/sometimes fails

Lennart Poettering lennart at poettering.net
Wed Feb 11 11:09:06 PST 2015


On Sun, 08.02.15 09:21, Andrei Borzenkov (arvidjaar at gmail.com) wrote:

> В Wed, 4 Feb 2015 14:34:01 +0100
> Lennart Poettering <lennart at poettering.net> пишет:
> 
> > On Wed, 04.02.15 11:13, Peter Valdemar Mørch (peter at morch.com) wrote:
> > 
> > > First: Please let me know if this is an inappropriate place to ask this
> > > 
> > > # systemctl restart syslog.socket rsyslog.service
> > > 
> > > seems to always work. But
> > > 
> > > # systemctl restart  rsyslog.service syslog.socket
> > > 
> > > , the opposite sequence, seems to sometimes fail (details below). I'm
> > > wondering: Why is that?
> > 
> > Whats are the precise ordering and requirement deps between those two
> > services?
> > 
> > Note that the command will first enqueue the restart job for the first
> > mentioned service, then the restart job for the second service. It
> > will then wait for both jobs to complete. Depending on the deps it
> > might happen in the second case, that the service is first stopped,
> > and then the socket stopped, and then the service started again. Now,
> > when the socket is about to be started again too, the service will
> > already be up, but in non-socket-activation mode, at which point the
> > socket unit refuses to start up, in order to not corrupt the socket
> > the service created on its own without usage of socket activation.
> > 
> 
> Is it possible to build transaction involving all units? Then it would
> not depend on precise ordering, right?

Michal Sekletar was working on a patch that made it possible to
enqueue multiple specified jobs within a single transaction, but this
has not been finished so far.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list