all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* shepherd: failing test: should `herd stop` stop a respawning process?
@ 2024-10-06 17:02 Attila Lendvai
  2024-10-06 17:31 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 1 reply; 2+ messages in thread
From: Attila Lendvai @ 2024-10-06 17:02 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

i have a daemon process that quits soon after it starts (when it has some issue with its configurations).

then i usually fix the config, and do a guix system reconfigure. but i have noticed from the logs that this process often remains in a resawn loop, even if i herd stop and herd disable it after the reconfigure (i.e. a shepherd service upgrade).

i have attached a respawn2.sh that when put under tests/ reproduces the issue in a shepherd checkout (see the TODO notes):

$ guix shell
$ make check TESTS="tests/respawn2.sh"

what's wrong?
 - is it my expectation that herd stop should stop the respawning loop?

 - do i have a bug in my test.sh?

 - is this a shepherd bug? if so, then shall i finish up this test case as a proper patch for shepherd?

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“In all history there is no war which was not hatched by the governments, the governments alone, independent of the interests of the people, to whom war is always pernicious even when successful.”
	— Leo Tolstoy (1828–1910), 'On Patriotism' (1894)

[-- Attachment #2: respawn2.sh --]
[-- Type: application/x-shellscript, Size: 4298 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: shepherd: failing test: should `herd stop` stop a respawning process?
  2024-10-06 17:02 shepherd: failing test: should `herd stop` stop a respawning process? Attila Lendvai
@ 2024-10-06 17:31 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2024-10-06 17:31 UTC (permalink / raw)
  To: Attila Lendvai; +Cc: guix-devel

Hi Attila,

On Sun, Oct 06 2024, Attila Lendvai wrote:

>  - my expectation that herd stop should stop the respawning loop?

My sense is that the Shepherd and systemd always restart services.  I
don't think they know whether a failure relates to configuration or to
something else, but they could probably measure the rate of failure and
stop at some point.

You can mark services as "one-shot."  They are not restarted.  Maybe
that setting is helpful until your configuration is working.

Kind regards
Felix


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-06 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06 17:02 shepherd: failing test: should `herd stop` stop a respawning process? Attila Lendvai
2024-10-06 17:31 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.