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

Reindl Harald h.reindl at thelounge.net
Wed Feb 4 13:42:36 PST 2015



Am 04.02.2015 um 22:31 schrieb Lennart Poettering:
> 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

i know that all but *you said* above "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"

that is all i referred to

no - my config change shoul *not* get applied when the daemon "is 
currently being started" because that is aksing for luck and race 
conditions and leads in unpredictable behavior

if you (systemd) know that the system is about shut down there is no 
point in reload services at that time

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150204/31c8a246/attachment.sig>


More information about the systemd-devel mailing list