[systemd-devel] Antw: Re: Antw: Re: Unexplainable unit restart ("Start request repeated too quickly")
Reindl Harald
h.reindl at thelounge.net
Mon Jun 3 12:41:24 UTC 2019
Am 03.06.19 um 12:43 schrieb Ulrich Windl:
>>>> Reindl Harald <h.reindl at thelounge.net> schrieb am 03.06.2019 um 12:35 in
> Nachricht <e9c0903d-dbae-b9c6-d202-ebb0d0e7b399 at thelounge.net>:
>
>>
>> Am 03.06.19 um 12:30 schrieb Ulrich Windl:
>>>> That looks fine, though it _might_ make sense for it to have
>>>> RemainAfterExit= turned on. After all, if default.target or
>>>> iotwatch.target get restarted for any reason, then this unit will be
>>>> started again.
>>>
>>> That's a valuable hint: I thought systemd would remember that once started
>>> with success, the service is considered started until stopped manually.
>>> So does RemainAFterExit created a kind of dummy process that just remembers
>>> the state? The manual is not clear when you would need it:
>>>
>>> RemainAfterExit=
>>> Takes a boolean value that specifies whether the service shall be
>>> considered active even when all its processes exited. Defaults to
>>> no.
>>
>> a oneshot service without "RemainAfterExit" is not "active" for good
>> reasons - think about timer activated units or socket activated services
>> which both terminate after the last process exits and are started again
>> at the next event
>
> But why isn't it on by default for "oneshot"?
why should it?
the whole point of "oneshot" is what it says: oneshot
RemainAfterExit is the exception from them
> And if RemainAfterExit is on, can I simply "start" a oneshot service again, or do I need a "restart"?
no, and i have implicit answered that pointiong out timer and socket
activated services where RemainAfterExit would work only once and then,
well, it's considered as running an not started again on the next event
even if there is no process
More information about the systemd-devel
mailing list