[systemd-devel] [PATCH] Avoid reloading services when shutting down

Lennart Poettering lennart at poettering.net
Wed Feb 4 13:31:16 PST 2015


On Wed, 04.02.15 22:25, Reindl Harald (h.reindl at thelounge.net) wrote:

> Am 04.02.2015 um 21:57 schrieb Lennart Poettering:
> >OK, let's try this again, with an example:
> >
> >a) you have one service mydaemon.service
> >
> >b) you have a preparation service called
> >    mydaemon-convert-config.service that takes config from somewhere,
> >    converts it into a suitable format for mydaemon.service's binary
> >
> >Now, you change that config that is located somewhere, issue a restart
> >request for m-c-c.s, issue a reload request for mydaemon.service.
> >
> >Now, something like this should always have the result that your
> >config change is applied to mydaemon.service. Regardless if
> >mydaemon.service's start was queued, is already started or is
> >currently being started. You are suggesting that the reload can
> >suppressed when a start is already enqueued
> 
> which is true
> 
> the config change *after* issue restart should not affect the already
> pending (for whatever reason) restart because this is *unpredictable*
> bahvior - if i expect that config change to get effective i would issue
> "systemctl reload" *before* the restart command

We don't make guarantees like that. This is UNIX, we have no
transaction file system.

We do make guarantees about that if you changed your config and issue
a reload, we will not drop that reload. We do not make guarantees
whether changing your config concurrently with the daemon confuses the
daemon or not. That's between the user and the daemon, we are not involved.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list