shepherd respawns a service even when it's disabled

  • Done
  • quality assurance status badge
Details
3 participants
  • Attila Lendvai
  • Attila Lendvai
  • Ludovic Courtès
Owner
unassigned
Submitted by
Attila Lendvai
Severity
normal
A
A
Attila Lendvai wrote on 11 Jun 2023 20:01
(name . bug-guix@gnu.org)(address . bug-guix@gnu.org)
60Ly9jr0c-9jYUDycPQpxSk2vDqagWpaD0Vscr9LMZB83y8DO4uW0TpPMd1v1FjRIZG6-egSvxo3CwlxEn2lE1hNdb5sm3oj0xB-Hnn_OZc=@lendvai.name
the issue:

i'm in a situation where my service quits after a few seconds of CPU usage (i.e. the default-respawn-limit is not triggered). therefore shepherd keeps restarting it, practically in a busy loop.

suggested solution:

maybe respawn-service should check for the disabled state, so that the admin can intervene by `herd disable myservice`.

a longer term solution could be to add a respawn-delay field for <service>, and default it to something non-zero.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
The mind: an excellent servant, but a dangerous master.
A
A
Attila Lendvai wrote on 11 Jun 2023 20:06
(address . 64008@debbugs.gnu.org)
87edmhzxed.fsf@lendvai.name
i forgot to mention that the service is in the stopped state while this is happening, at least according to `herd status`.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“Most of our lives, most of us live in realities determined by others, imprinted in our brains by education, by religion, by politics, by the authorities.”
— Timothy Leary (1920–1996)
L
L
Ludovic Courtès wrote on 14 Jun 2023 18:49
(name . Attila Lendvai)(address . attila@lendvai.name)(address . 64008-done@debbugs.gnu.org)
877cs6rntj.fsf@gnu.org
Hi Attila,

Attila Lendvai <attila@lendvai.name> skribis:

Toggle quote (6 lines)
> i'm in a situation where my service quits after a few seconds of CPU usage (i.e. the default-respawn-limit is not triggered). therefore shepherd keeps restarting it, practically in a busy loop.
>
> suggested solution:
>
> maybe respawn-service should check for the disabled state, so that the admin can intervene by `herd disable myservice`.

Turns out the service controller was ignoring the ‘enabled?’ flag,
leaving it up to the caller to check it.

This is fixed by Shepherd commit
7c88d67076a0bb1d9014b3bc23ed9c68f1c702ab.

Thanks again,
Ludo’.
Closed
?