guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 50d55374a63c72732e4c8161124a1cef1cac3225
Author: Giacomo Leidi <[email protected]>
AuthorDate: Tue Mar 10 00:51:57 2026 +0100
services: Do no fork in oci-service-type's one-shot services.
Forking shouldn't be done in one-shot services as this messes up the
Shepherd's understanding of a process status.
* gnu/services/containers.scm
(oci-object-shepherd-service): Replace
fork+exec-command with spawn-command.
* gnu/services/tests.scm: Adjust tests.
Change-Id: I4bb28796352afaf070aa4584996cdfcf344378ba
---
gnu/services/containers.scm | 13 +++++++------
gnu/tests/containers.scm | 4 ++--
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm
index 951bb70ec40..f5d12774924 100644
--- a/gnu/services/containers.scm
+++ b/gnu/services/containers.scm
@@ -1430,12 +1430,13 @@ by INVOCATIONS through RUNTIME-STATE."
" provisioning service"))
(start
#~(lambda _
- (fork+exec-command
- (list #$entrypoint)
- #$@(if user (list #:user user) '())
- #$@(if group (list #:group group) '())
- #:environment-variables
- (list #$@runtime-environment))))
+ (zero?
+ (spawn-command
+ (list #$entrypoint)
+ #$@(if user (list #:user user) '())
+ #$@(if group (list #:group group) '())
+ #:environment-variables
+ (list #$@runtime-environment)))))
(actions
(list
(oci-command-line-shepherd-action
diff --git a/gnu/tests/containers.scm b/gnu/tests/containers.scm
index dbf80b20140..0850ffd5d6e 100644
--- a/gnu/tests/containers.scm
+++ b/gnu/tests/containers.scm
@@ -637,7 +637,7 @@ in the past.")
(marionette-eval
'(begin
(use-modules (gnu services herd))
- (wait-for-service 'user-processes))
+ (wait-for-service 'podman-volumes #:timeout 80))
marionette)
(test-assert "podman-volumes running"
@@ -687,7 +687,7 @@ in the past.")
#:verbose? #t))))
marionette)))
;; Allow services to come up on slower machines.
- (with-retries 120 1
+ (with-retries 240 1
(equal?
'("localhost/guile:latest")
(run-test)))))