guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/07: services: shepherd: Do not unload transient services.


From: guix-commits
Subject: 02/07: services: shepherd: Do not unload transient services.
Date: Sat, 9 Apr 2022 18:18:25 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit eeb8ac43c8c0b0cc69422766070dbefc55f5c5c1
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Apr 9 23:50:10 2022 +0200

    services: shepherd: Do not unload transient services.
    
    Fixes <https://issues.guix.gnu.org/54812>.
    
    Starting with Shepherd 0.9.0 and the use of 'make-inetd-constructor' in
    commit 808b9e850491c7b1d867a5f1f4d5ee6f61f345d4, systems might be
    running transient Shepherd services such as those corresponding to SSH
    connections.  Before this change, 'shepherd-service-upgrade' would have
    those transient services in the list of services to unload; concretely,
    that would lead all SSH connections to be closed upon 'guix system
    reconfigure'.
    
    * gnu/services/shepherd.scm (shepherd-service-upgrade): Remove transient
    services to TO-UNLOAD.
---
 gnu/services/shepherd.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 5e8880cefe..4fd4b2a497 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès 
<ludo@gnu.org>
+;;; Copyright © 2013-2016, 2018-2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
@@ -470,8 +470,13 @@ need to be restarted to complete their upgrade."
     (filter running? target))
 
   (define to-unload
-    ;; Unload services that are no longer required.
-    (remove essential? (filter obsolete? live)))
+    ;; Unload services that are no longer required.  Essential services must
+    ;; be kept and transient services such as inetd child services should be
+    ;; kept as well--they'll vanish eventually.
+    (remove (lambda (live)
+              (or (essential? live)
+                  (live-service-transient? live)))
+            (filter obsolete? live)))
 
   (values to-unload to-restart))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]