From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 11:25:38 2017 Received: (at submit) by debbugs.gnu.org; 8 May 2017 15:25:38 +0000 Received: from localhost ([127.0.0.1]:34544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kXa-0000uo-Gc for submit@debbugs.gnu.org; Mon, 08 May 2017 11:25:38 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kXY-0000ub-OU for submit@debbugs.gnu.org; Mon, 08 May 2017 11:25:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7kXT-0003qm-4F for submit@debbugs.gnu.org; Mon, 08 May 2017 11:25:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7kXT-0003qe-14 for submit@debbugs.gnu.org; Mon, 08 May 2017 11:25:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7kXR-0003K1-PP for guix-patches@gnu.org; Mon, 08 May 2017 11:25:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7kXO-0003pS-GT for guix-patches@gnu.org; Mon, 08 May 2017 11:25:29 -0400 Received: from mail.lassieur.org ([83.152.10.219]:36924) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7kXO-0003o2-32 for guix-patches@gnu.org; Mon, 08 May 2017 11:25:26 -0400 Received: from rodion (192.168.0.254 [192.168.0.254]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id f20d878a (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Mon, 8 May 2017 15:25:19 +0000 (UTC) User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: guix-patches@gnu.org Subject: Allow services to implement a 'reload' action Date: Mon, 08 May 2017 17:25:18 +0200 Message-ID: <87d1bjtlpd.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Hi, The first patch allows services to implement a 'reload' action, and the other three implement the 'reload' action for nginx, prosody and dovecot. Services do not have to implement 'reload' and if, say, foo-daemon doesn't implement it, 'herd reload foo-daemon' will return 1 and display a message saying that foo-deamon does not have an action 'reload'. That's the reason of the #f default value. WDYT? From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 11:28:45 2017 Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:45 +0000 Received: from localhost ([127.0.0.1]:34555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kab-000102-63 for submit@debbugs.gnu.org; Mon, 08 May 2017 11:28:45 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kaa-0000zu-3N for 26830@debbugs.gnu.org; Mon, 08 May 2017 11:28:44 -0400 Received: from localhost.localdomain (192.168.0.254 [192.168.0.254]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 63bb3fe2 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for <26830@debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= To: 26830@debbugs.gnu.org Subject: [PATCH 1/4] services: shepherd: Allow services to implement a 'reload' action. Date: Mon, 8 May 2017 17:28:29 +0200 Message-Id: <20170508152832.4797-1-clement@lassieur.org> X-Mailer: git-send-email 2.12.2 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/shepherd.scm ()[reload]: Add it. (shepherd-service-file): Add it to the Shepherd's service definition. * doc/guix.texi (Services): Update accordingly. --- doc/guix.texi | 7 ++++--- gnu/services/shepherd.scm | 9 ++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 4446909ed..3ccfa8d9e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8671,9 +8671,10 @@ service: Run libc's name service cache daemon (nscd). @end example -The @command{start}, @command{stop}, and @command{restart} sub-commands -have the effect you would expect. For instance, the commands below stop -the nscd service and restart the Xorg display server: +The @command{start}, @command{stop}, @command{restart} and +@command{reload} sub-commands have the effect you would expect. For +instance, the commands below stop the nscd service and restart the Xorg +display server: @example # herd stop nscd diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index 7281746ab..17e53f774 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -47,6 +47,7 @@ shepherd-service-respawn? shepherd-service-start shepherd-service-stop + shepherd-service-reload shepherd-service-auto-start? shepherd-service-modules @@ -137,6 +138,8 @@ for a service that extends SHEPHERD-ROOT-SERVICE-TYPE and nothing else." (start shepherd-service-start) ;g-expression (procedure) (stop shepherd-service-stop ;g-expression (procedure) (default #~(const #f))) + (reload shepherd-service-reload ;g-expression (procedure) + (default #f)) (auto-start? shepherd-service-auto-start? ;Boolean (default #t)) (modules shepherd-service-modules ;list of module names @@ -214,7 +217,11 @@ stored." #:requires '#$(shepherd-service-requirement service) #:respawn? '#$(shepherd-service-respawn? service) #:start #$(shepherd-service-start service) - #:stop #$(shepherd-service-stop service)))))) + #:stop #$(shepherd-service-stop service) + #:actions (make-actions + (reload + "Reload the service's configuration files." + #$(shepherd-service-reload service)))))))) (define (shepherd-configuration-file services) "Return the shepherd configuration file for SERVICES." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 11:28:47 2017 Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:47 +0000 Received: from localhost ([127.0.0.1]:34559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kad-00010Q-FY for submit@debbugs.gnu.org; Mon, 08 May 2017 11:28:47 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kaa-0000zu-Rl for 26830@debbugs.gnu.org; Mon, 08 May 2017 11:28:45 -0400 Received: from localhost.localdomain (192.168.0.254 [192.168.0.254]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 2ff5691b (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for <26830@debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= To: 26830@debbugs.gnu.org Subject: [PATCH 2/4] gnu: services: nginx: Add a 'reload' action. Date: Mon, 8 May 2017 17:28:30 +0200 Message-Id: <20170508152832.4797-2-clement@lassieur.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170508152832.4797-1-clement@lassieur.org> References: <20170508152832.4797-1-clement@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/web.scm (nginx-shepherd-service): Add it. --- gnu/services/web.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index f85b41215..956aa1518 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 ng0 ;;; Copyright © 2016, 2017 Julien Lepiller ;;; Copyright © 2017 Christopher Baines +;;; Copyright © 2017 Clément Lassieur ;;; ;;; This file is part of GNU Guix. ;;; @@ -262,13 +263,13 @@ of index files." run-directory server-blocks upstream-blocks)) #$@args)))))) - ;; TODO: Add 'reload' action. (list (shepherd-service (provision '(nginx)) (documentation "Run the nginx daemon.") (requirement '(user-processes loopback)) (start (nginx-action "-p" run-directory)) - (stop (nginx-action "-s" "stop")))))))) + (stop (nginx-action "-s" "stop")) + (reload (nginx-action "-s" "reload")))))))) (define nginx-service-type (service-type (name 'nginx) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 11:28:48 2017 Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:48 +0000 Received: from localhost ([127.0.0.1]:34561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kad-00010S-QV for submit@debbugs.gnu.org; Mon, 08 May 2017 11:28:48 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kab-0000zu-Mm for 26830@debbugs.gnu.org; Mon, 08 May 2017 11:28:46 -0400 Received: from localhost.localdomain (192.168.0.254 [192.168.0.254]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 74fc6667 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for <26830@debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= To: 26830@debbugs.gnu.org Subject: [PATCH 3/4] gnu: services: prosody: Add a 'reload' action. Date: Mon, 8 May 2017 17:28:31 +0200 Message-Id: <20170508152832.4797-3-clement@lassieur.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170508152832.4797-1-clement@lassieur.org> References: <20170508152832.4797-1-clement@lassieur.org> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/messaging.scm (prosody-shepherd-service): Add it. --- gnu/services/messaging.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 715d6181f..1f357c1c5 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -582,7 +582,8 @@ See also @url{http://prosody.im/doc/modules/mod_muc}." (provision '(prosody xmpp-daemon)) (requirement '(networking syslogd user-processes)) (start (prosodyctl-action "start")) - (stop (prosodyctl-action "stop")))))) + (stop (prosodyctl-action "stop")) + (reload (prosodyctl-action "reload")))))) (define %prosody-accounts (list (user-group (name "prosody") (system? #t)) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 11:28:48 2017 Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:48 +0000 Received: from localhost ([127.0.0.1]:34563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kae-00010a-2z for submit@debbugs.gnu.org; Mon, 08 May 2017 11:28:48 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7kac-0000zu-L0 for 26830@debbugs.gnu.org; Mon, 08 May 2017 11:28:46 -0400 Received: from localhost.localdomain (192.168.0.254 [192.168.0.254]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 265c69c3 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for <26830@debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= To: 26830@debbugs.gnu.org Subject: [PATCH 4/4] gnu: services: dovecot: Add a 'reload' action. Date: Mon, 8 May 2017 17:28:32 +0200 Message-Id: <20170508152832.4797-4-clement@lassieur.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170508152832.4797-1-clement@lassieur.org> References: <20170508152832.4797-1-clement@lassieur.org> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/mail.scm (dovecot-shepherd-service): Add it. --- gnu/services/mail.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm index 6305f06f8..db0772c47 100644 --- a/gnu/services/mail.scm +++ b/gnu/services/mail.scm @@ -1528,7 +1528,10 @@ greyed out, instead of only later giving \"not selectable\" popup error. "-F" "-c" #$config-file))) (stop #~(make-forkexec-constructor (list (string-append #$dovecot "/sbin/dovecot") - "-c" #$config-file "stop"))))))) + "-c" #$config-file "stop"))) + (reload #~(make-forkexec-constructor + (list (string-append #$dovecot "/bin/doveadm") + "-c" #$config-file "reload"))))))) (define %dovecot-pam-services (list (unix-pam-service "dovecot"))) -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 11:36:54 2017 Received: (at 26830) by debbugs.gnu.org; 9 May 2017 15:36:54 +0000 Received: from localhost ([127.0.0.1]:34333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d87C2-0004tN-BA for submit@debbugs.gnu.org; Tue, 09 May 2017 11:36:54 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:34047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d87C0-0004tA-TV for 26830@debbugs.gnu.org; Tue, 09 May 2017 11:36:53 -0400 Received: by mail-wr0-f179.google.com with SMTP id l9so4219816wre.1 for <26830@debbugs.gnu.org>; Tue, 09 May 2017 08:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=+FqjVdSDiQg5DSEy5xHQx2VXOlyOVxOV3qKl7i4GO28=; b=qJ2x/Hmn0tO7HPk4Bf5ISnFnG6xn5fwTLPHEjFTRyNGwl50km5iDXplUyzUY950a6W dU7fLm0VwA4gRAirocgsJEHNHUHUHrgeMuKt3t8fbkCrY0NrDEwaWPZG57TSCkEbA+6H rjFkLW/LhtYM1xE0+QctX6FTM3a9Y7svwaQnJ/bxWiNaRTD5pa6WDz6T9e5ClCVpz1MS KcjyRahk9Ref0hWRKX0hhZa4cBcPb5zYpPlm/abAiu22OSlzesQqqWLJr8nUP+zxjObZ I0nBRpGZx8dHsUu8ySpiuUQYBRu6OIX+gymPNtFmebLOLI7bXSmdi/w3lOIYN4p8QnHm Shgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=+FqjVdSDiQg5DSEy5xHQx2VXOlyOVxOV3qKl7i4GO28=; b=SNk2r0UPpr0SNPj4nID6mj99VLgMVkvhRs0EWoPqNqIKG4FgK17fQWQHek4lalTwUR ywSfulC8/FBV1BGzOYAmxPX2L32XWlXFhFasZCoCxIaEKQEd4Euesi8rO/gXH/EsCuNn DZ3L8RhzxoqnHPt0SNj8RaC1hrc19mdo4z2X33GL7ASvH8xM8GteqBvu/ATKXyrTIgIP 0rVWWdYvDbSkmndGva1LKy7m1VR/WnFydNLkqQEKY+1HQrG+Y9RMqPqOnjYnVUcuwLbY mCdq54BaHcVnMa2g4hXnXktDLuA1G2qU5A9xVXrYA8lOCetuNHoMep95wdQ+UeZw+bAa qIlQ== X-Gm-Message-State: AODbwcB2YG8kXxtORsq2PQL1RjBxrCgm5gRdQPd3spYdeSOAZeU3Abp8 wnMJtEutLXQo+A== X-Received: by 10.28.238.20 with SMTP id m20mr549330wmh.121.1494344207128; Tue, 09 May 2017 08:36:47 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id v52sm255703wrc.53.2017.05.09.08.36.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 May 2017 08:36:46 -0700 (PDT) References: <87d1bjtlpd.fsf@lassieur.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: bug#26830: Allow services to implement a 'reload' action In-reply-to: <87d1bjtlpd.fsf@lassieur.org> Date: Tue, 09 May 2017 17:37:25 +0200 Message-ID: <86vapa6nyi.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26830 Cc: 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Clément, > Services do not have to implement 'reload' and if, say, foo-daemon > doesn't implement it, 'herd reload foo-daemon' will return 1 and display > a message saying that foo-deamon does not have an action 'reload'. > That's the reason of the #f default value. > > WDYT? Your whole serie LGTM for me ! I have just one small concern, there is a already a "reload" action on shepherd root service. For instance you can call "herd reload root conf.scm". Maybe it will be unclear for users how reload action differs on root service where it takes an argument and guix services where it does not. You could maybe mention that in the documentation and/or in the code ? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Wed May 10 15:31:55 2017 Received: (at 26830) by debbugs.gnu.org; 10 May 2017 19:31:55 +0000 Received: from localhost ([127.0.0.1]:37103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8XL1-0003m3-7C for submit@debbugs.gnu.org; Wed, 10 May 2017 15:31:55 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8XKz-0003lq-FM for 26830@debbugs.gnu.org; Wed, 10 May 2017 15:31:53 -0400 Received: from localhost.localdomain (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 3a8b21d3 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for <26830@debbugs.gnu.org>; Wed, 10 May 2017 19:31:51 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= To: 26830@debbugs.gnu.org Subject: [PATCH] services: shepherd: Allow services to implement a 'reload' action. Date: Wed, 10 May 2017 21:31:37 +0200 Message-Id: <20170510193137.846-1-clement@lassieur.org> X-Mailer: git-send-email 2.12.2 In-Reply-To: <86vapa6nyi.fsf@gmail.com> References: <86vapa6nyi.fsf@gmail.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/services/shepherd.scm ()[reload]: Add it. (shepherd-service-file): Add it to the Shepherd's service definition. * doc/guix.texi (Services, Shepherd Services): Update accordingly. --- doc/guix.texi | 14 +++++++++++--- gnu/services/shepherd.scm | 9 ++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 81aa957c6..2d2015df2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8674,9 +8674,10 @@ service: Run libc's name service cache daemon (nscd). @end example -The @command{start}, @command{stop}, and @command{restart} sub-commands -have the effect you would expect. For instance, the commands below stop -the nscd service and restart the Xorg display server: +The @command{start}, @command{stop}, @command{restart} and +@command{reload} sub-commands have the effect you would expect. For +instance, the commands below stop the nscd service and restart the Xorg +display server: @example # herd stop nscd @@ -16204,6 +16205,13 @@ Constructors,,, shepherd, The GNU Shepherd Manual}). They are given as G-expressions that get expanded in the Shepherd configuration file (@pxref{G-Expressions}). +@item @code{reload} (default: @code{#f}) +The @code{reload} field refers to the Shepherd's facilities to reload +the service's configuration files without restarting. They are +@code{actions} (@pxref{Slots of services,,, shepherd, The GNU Shepherd +Manual}) and are given as G-expressions that get expanded in the +Shepherd configuration file (@pxref{G-Expressions}). + @item @code{documentation} A documentation string, as shown when running: diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index 7281746ab..17e53f774 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -47,6 +47,7 @@ shepherd-service-respawn? shepherd-service-start shepherd-service-stop + shepherd-service-reload shepherd-service-auto-start? shepherd-service-modules @@ -137,6 +138,8 @@ for a service that extends SHEPHERD-ROOT-SERVICE-TYPE and nothing else." (start shepherd-service-start) ;g-expression (procedure) (stop shepherd-service-stop ;g-expression (procedure) (default #~(const #f))) + (reload shepherd-service-reload ;g-expression (procedure) + (default #f)) (auto-start? shepherd-service-auto-start? ;Boolean (default #t)) (modules shepherd-service-modules ;list of module names @@ -214,7 +217,11 @@ stored." #:requires '#$(shepherd-service-requirement service) #:respawn? '#$(shepherd-service-respawn? service) #:start #$(shepherd-service-start service) - #:stop #$(shepherd-service-stop service)))))) + #:stop #$(shepherd-service-stop service) + #:actions (make-actions + (reload + "Reload the service's configuration files." + #$(shepherd-service-reload service)))))))) (define (shepherd-configuration-file services) "Return the shepherd configuration file for SERVICES." -- 2.12.2 From debbugs-submit-bounces@debbugs.gnu.org Wed May 10 15:32:01 2017 Received: (at 26830) by debbugs.gnu.org; 10 May 2017 19:32:01 +0000 Received: from localhost ([127.0.0.1]:37106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8XL7-0003mM-EM for submit@debbugs.gnu.org; Wed, 10 May 2017 15:32:01 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8XL5-0003lq-HL for 26830@debbugs.gnu.org; Wed, 10 May 2017 15:31:59 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 10492aac (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Wed, 10 May 2017 19:31:58 +0000 (UTC) References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Mathieu Othacehe Subject: Re: bug#26830: Allow services to implement a 'reload' action In-reply-to: <86vapa6nyi.fsf@gmail.com> Date: Wed, 10 May 2017 21:31:58 +0200 Message-ID: <87vap8h5jl.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 Cc: 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Mathieu Othacehe writes: >> Services do not have to implement 'reload' and if, say, foo-daemon >> doesn't implement it, 'herd reload foo-daemon' will return 1 and display >> a message saying that foo-deamon does not have an action 'reload'. >> That's the reason of the #f default value. >> >> WDYT? > > Your whole serie LGTM for me ! Hi Mathieu, thanks for reviewing :) > I have just one small concern, there is a already a "reload" action on > shepherd root service. > > For instance you can call "herd reload root conf.scm". > > Maybe it will be unclear for users how reload action differs on root > service where it takes an argument and guix services where it does not. They don't differ: 'root' is just another service, as 'nginx' is. Our 'reload' action can handle many arguments as well. The only tiny difference is that the 'root' service is implemented by Shepherd, not by Guix. > You could maybe mention that in the documentation and/or in the code ? Sure, I updated the documentation. I had forgotten the "Shepherd Services" part and I think it helps understanding. But I didn't talk about the 'root' service because it is a Shepherd thing and is already described in the Shepherd manual. WDYT? From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 03:13:09 2017 Received: (at 26830) by debbugs.gnu.org; 11 May 2017 07:13:09 +0000 Received: from localhost ([127.0.0.1]:37523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8iHd-0003LS-JH for submit@debbugs.gnu.org; Thu, 11 May 2017 03:13:09 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8iHb-0003LI-MI for 26830@debbugs.gnu.org; Thu, 11 May 2017 03:13:08 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 83314108 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <26830@debbugs.gnu.org>; Thu, 11 May 2017 07:13:05 +0000 (UTC) References: <86vapa6nyi.fsf@gmail.com> <20170510193137.846-1-clement@lassieur.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: 26830@debbugs.gnu.org Subject: Re: bug#26830: [PATCH] services: shepherd: Allow services to implement a 'reload' action. In-reply-to: <20170510193137.846-1-clement@lassieur.org> Date: Thu, 11 May 2017 09:13:05 +0200 Message-ID: <8760h7rhmm.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Clément Lassieur writes: > +@item @code{reload} (default: @code{#f}) > +The @code{reload} field refers to the Shepherd's facilities to reload > +the service's configuration files without restarting. They are > +@code{actions} (@pxref{Slots of services,,, shepherd, The GNU Shepherd > +Manual}) and are given as G-expressions that get expanded in the > +Shepherd configuration file (@pxref{G-Expressions}). With singular instead of plural...: @item @code{reload} (default: @code{#f}) The @code{reload} field refers to the Shepherd's facilities to reload the service's configuration files without restarting. It is an @code{action} (@pxref{Slots of services,,, shepherd, The GNU Shepherd Manual}) and is given as a G-expression that gets expanded in the Shepherd configuration file (@pxref{G-Expressions}). From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 08:40:29 2017 Received: (at 26830) by debbugs.gnu.org; 11 May 2017 12:40:29 +0000 Received: from localhost ([127.0.0.1]:37798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8nOP-0006Ee-8c for submit@debbugs.gnu.org; Thu, 11 May 2017 08:40:29 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8nON-0006EV-QE for 26830@debbugs.gnu.org; Thu, 11 May 2017 08:40:28 -0400 Received: from newt (46.218.109.88 [46.218.109.88]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 78cf377e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <26830@debbugs.gnu.org>; Thu, 11 May 2017 12:40:25 +0000 (UTC) References: <86vapa6nyi.fsf@gmail.com> <20170510193137.846-1-clement@lassieur.org> <8760h7rhmm.fsf@lassieur.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: 26830@debbugs.gnu.org Subject: Re: bug#26830: [PATCH] services: shepherd: Allow services to implement a 'reload' action. In-reply-to: <8760h7rhmm.fsf@lassieur.org> Date: Thu, 11 May 2017 14:40:25 +0200 Message-ID: <87vap7sh1i.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Clément Lassieur writes: > Clément Lassieur writes: > >> +@item @code{reload} (default: @code{#f}) >> +The @code{reload} field refers to the Shepherd's facilities to reload >> +the service's configuration files without restarting. They are >> +@code{actions} (@pxref{Slots of services,,, shepherd, The GNU Shepherd >> +Manual}) and are given as G-expressions that get expanded in the >> +Shepherd configuration file (@pxref{G-Expressions}). > > With singular instead of plural...: > > @item @code{reload} (default: @code{#f}) > The @code{reload} field refers to the Shepherd's facilities to reload > the service's configuration files without restarting. It is an > @code{action} (@pxref{Slots of services,,, shepherd, The GNU Shepherd > Manual}) and is given as a G-expression that gets expanded in the > Shepherd configuration file (@pxref{G-Expressions}). New version: @item @code{reload} (default: @code{#f}) The @code{reload} field allows Shepherd to reload the service's configuration files without restarting. It is an @code{action} (@pxref{Slots of services,,, shepherd, The GNU Shepherd Manual}) and is given as a G-expression that gets expanded in the Shepherd configuration file (@pxref{G-Expressions}). From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 08:57:36 2017 Received: (at 26830) by debbugs.gnu.org; 11 May 2017 12:57:36 +0000 Received: from localhost ([127.0.0.1]:37805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8nex-0006eA-PW for submit@debbugs.gnu.org; Thu, 11 May 2017 08:57:35 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:34587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8nev-0006dv-CO for 26830@debbugs.gnu.org; Thu, 11 May 2017 08:57:33 -0400 Received: by mail-wr0-f179.google.com with SMTP id l9so19942154wre.1 for <26830@debbugs.gnu.org>; Thu, 11 May 2017 05:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=+1y03oPycYSHC6vGrA6kr1DZIbsWRO3zGeNZExCTxKk=; b=mlkymf9pvCxpyUN0NQqQ7upjSF+ePs8fQsK7sdacKWH8x2gz4GVAYbxYE8y28vn093 16ixdsOnooDpMycCQiZPLRk5I6LdwrFnRaEz9NxUDpl7PnZYFxU/O3f/PBDozGR7eD2e /VFGXRBlr1pWaBeYWVKa5+/rq3jm9l+EyUq1WXAlbc8u6mcDWKg13c7LagCRxmyE/MHS iWzg3Tvaj46WxFVRK3Q+Db1Z0FnIE0E2m+WAyg8S9vS1RWClSSylXyOWKJPxjUvpfnd2 XXV5Ri/bj8ixGYEtUpB/0oiPyQz9L/Jyur95CKvvZCVCQz7IgBKVlJBCyrBoGiJEoccE nSMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=+1y03oPycYSHC6vGrA6kr1DZIbsWRO3zGeNZExCTxKk=; b=NzzIW3DcDljR+DugVwBwJjQt+IkezzM5mhQVaUDobB6d5MpBkEm8a56iyZWgMoz2qJ RzP0z8uDFbsWRITgb90+Euf6cBTTTI8jOdigJgfu98PI3T8OwHsF45hvE2DRuBK0YXP1 pEcRknT//xC35pUga1Y2fO5jle1qVswDfzEcPL2GALJZEHrVqiL1wFqexTctJucCXdec FGJTyJkhnqEB1TB0EV0810Vkd8br+GbhfEaiqpoFL/h3ssdmnWjHHUGRX0MV+bJ00s5F n+xZPfmFRqZRfYZxkgCK+j90ZPf83lxeqKIDrda0iuUNedqdXDvp1+kMgjDKETiyDBlC MiWQ== X-Gm-Message-State: AODbwcAkuTV6CDdD9cDqZ8SsGTxxbmfRVg6N0kTgz7MswbT7uacT658j knKHf2SOjS/m5A== X-Received: by 10.223.170.197 with SMTP id i5mr103022wrc.143.1494507447346; Thu, 11 May 2017 05:57:27 -0700 (PDT) Received: from zbook ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id i11sm97500wrb.44.2017.05.11.05.57.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 May 2017 05:57:26 -0700 (PDT) References: <86vapa6nyi.fsf@gmail.com> <20170510193137.846-1-clement@lassieur.org> <8760h7rhmm.fsf@lassieur.org> <87vap7sh1i.fsf@lassieur.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Mathieu Othacehe To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: bug#26830: [PATCH] services: shepherd: Allow services to implement a 'reload' action. In-reply-to: <87vap7sh1i.fsf@lassieur.org> Date: Thu, 11 May 2017 14:57:26 +0200 Message-ID: <86shkbzh3d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26830 Cc: 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > @item @code{reload} (default: @code{#f}) > The @code{reload} field allows Shepherd to reload the service's > configuration files without restarting. It is an @code{action} > (@pxref{Slots of services,,, shepherd, The GNU Shepherd Manual}) and is > given as a G-expression that gets expanded in the Shepherd configuration > file (@pxref{G-Expressions}). The new version looks better ! LGTM ! Mathieu From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 17:24:18 2017 Received: (at 26830) by debbugs.gnu.org; 11 May 2017 21:24:18 +0000 Received: from localhost ([127.0.0.1]:39212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8vZK-0007Rm-4L for submit@debbugs.gnu.org; Thu, 11 May 2017 17:24:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8vZJ-0007Ra-0a for 26830@debbugs.gnu.org; Thu, 11 May 2017 17:24:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8vZA-00014b-0K for 26830@debbugs.gnu.org; Thu, 11 May 2017 17:24:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8vZ9-00014W-Sm; Thu, 11 May 2017 17:24:07 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60500 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d8vZ9-0004un-1n; Thu, 11 May 2017 17:24:07 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26830: Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> Date: Thu, 11 May 2017 23:24:04 +0200 In-Reply-To: <86vapa6nyi.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 09 May 2017 17:37:25 +0200") Message-ID: <87vap7kryj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26830 Cc: 26830@debbugs.gnu.org, =?utf-8?Q?Cl=C3=A9ment?= Lassieur X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello! Mathieu Othacehe skribis: >> Services do not have to implement 'reload' and if, say, foo-daemon >> doesn't implement it, 'herd reload foo-daemon' will return 1 and display >> a message saying that foo-deamon does not have an action 'reload'. >> That's the reason of the #f default value. >> >> WDYT? > > Your whole serie LGTM for me ! Same here, really happy to see this addressed! > I have just one small concern, there is a already a "reload" action on > shepherd root service. Right, but that=E2=80=99s just for =E2=80=98root=E2=80=99, not for the othe= r services. However, I think =E2=80=98reload=E2=80=99 might be confusing since in fact = it doesn=E2=80=99t load Scheme code, contrary to what =E2=80=9Cherd load root foo.scm=E2=80=9D= does (maybe that=E2=80=99s what you meant?). In fact it=E2=80=99s closer to what =E2= =80=9Cherd restart foo=E2=80=9D does. What about changing the name to =E2=80=98reconfigure=E2=80=99 or =E2=80=98u= pgrade=E2=80=99 to avoid the confusion? The logical next step of this series will be to have the service upgrade code in =E2=80=98guix system reconfigure=E2=80=99 invoke this action when i= t is defined. That will be awesome. Some comments: + #:actions (make-actions + (reload + "Reload the service's configuration file= s." + #$(shepherd-service-reload service))))))= )) Here I think we should only define the action when it has a non-#f value. That way we can distinguish between services that have a useful reload/reconfigure/upgrade action and those that don=E2=80=99t; in the latt= er case, we simply use =E2=80=98restart=E2=80=99 when upgrading. Regarding nginx: + (stop (nginx-action "-s" "stop")) + (reload (nginx-action "-s" "reload")))))))) Is this of any use in practice? The nginx command line is something like: /gnu/store/74kz9m850ycxpzkg6dvn9wbd3xjkwwrb-nginx-1.12.0/sbin/nginx -c /g= nu/store/5w11ahw113fndvab3xmwcjzs2rw56sbh-nginx-config/bayfront.conf -p /va= r/run/nginx and the configuration file in /gnu/store is immutable, so =E2=80=9Cnginx -s reload=E2=80=9D does nothing. If the action took an argument, we could do: herd reconfigure nginx /gnu/store/=E2=80=A6-new-config.conf which would translate to: nginx -s reload -c /gnu/store/=E2=80=A6-new-config.conf Probably our best option. Otherwise, I think we=E2=80=99d have to move the config to a fixed location= , say /etc/nginx, for =E2=80=9Cnginx -s reload=E2=80=9D to have any effect. Howe= ver I don=E2=80=99t quite like the use of /etc. Thoughts? Does Dovecot have the same problem? Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 17:24:28 2017 Received: (at control) by debbugs.gnu.org; 11 May 2017 21:24:28 +0000 Received: from localhost ([127.0.0.1]:39215 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8vZU-0007SC-Br for submit@debbugs.gnu.org; Thu, 11 May 2017 17:24:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8vZS-0007Rw-9s for control@debbugs.gnu.org; Thu, 11 May 2017 17:24:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8vZJ-00016K-J2 for control@debbugs.gnu.org; Thu, 11 May 2017 17:24:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8vZJ-00016F-FM for control@debbugs.gnu.org; Thu, 11 May 2017 17:24:17 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:60502 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d8vZI-0004us-Qc for control@debbugs.gnu.org; Thu, 11 May 2017 17:24:17 -0400 Date: Thu, 11 May 2017 23:24:14 +0200 Message-Id: <87tw4rkry9.fsf@gnu.org> To: control@debbugs.gnu.org From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: control message for bug #26830 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) severity 26830 important From debbugs-submit-bounces@debbugs.gnu.org Thu May 11 19:08:25 2017 Received: (at 26830) by debbugs.gnu.org; 11 May 2017 23:08:25 +0000 Received: from localhost ([127.0.0.1]:39370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8xC5-0000KC-8I for submit@debbugs.gnu.org; Thu, 11 May 2017 19:08:25 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d8xC3-0000K3-8a for 26830@debbugs.gnu.org; Thu, 11 May 2017 19:08:23 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 1c90c892 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Thu, 11 May 2017 23:08:18 +0000 (UTC) References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26830: Allow services to implement a 'reload' action In-reply-to: <87vap7kryj.fsf@gnu.org> Date: Fri, 12 May 2017 01:08:17 +0200 Message-ID: <874lwrq9em.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Ludovic, Thanks for commenting on this :) Ludovic Courtès writes: > Hello! > > Mathieu Othacehe skribis: > >>> Services do not have to implement 'reload' and if, say, foo-daemon >>> doesn't implement it, 'herd reload foo-daemon' will return 1 and display >>> a message saying that foo-deamon does not have an action 'reload'. >>> That's the reason of the #f default value. >>> >>> WDYT? >> >> Your whole serie LGTM for me ! > > Same here, really happy to see this addressed! > >> I have just one small concern, there is a already a "reload" action on >> shepherd root service. > > Right, but that’s just for ‘root’, not for the other services. > > However, I think ‘reload’ might be confusing since in fact it doesn’t > load Scheme code, contrary to what “herd load root foo.scm” does (maybe > that’s what you meant?). In fact it’s closer to what “herd restart > foo” does. > > What about changing the name to ‘reconfigure’ or ‘upgrade’ to avoid the > confusion? I think it's going to be even more confusing because the other init systems (systemd, sysvinit) all call it 'reload'. And, well, people are probably more familiar with Systemd's 'reload' than with Shepherd's 'reload root' :) WDYT? > The logical next step of this series will be to have the service upgrade > code in ‘guix system reconfigure’ invoke this action when it is defined. > That will be awesome. Indeed! > Some comments: > > + #:actions (make-actions > + (reload > + "Reload the service's configuration files." > + #$(shepherd-service-reload service)))))))) > > Here I think we should only define the action when it has a non-#f > value. That way we can distinguish between services that have a useful > reload/reconfigure/upgrade action and those that don’t; in the latter > case, we simply use ‘restart’ when upgrading. Ok. But right now IIRC we don't even use restart after a system reconfigure, probably because some services can't be restarted safely. Would that be why we need a 'reload/reconfigure/upgrade' for them? > Regarding nginx: > > + (stop (nginx-action "-s" "stop")) > + (reload (nginx-action "-s" "reload")))))))) > > Is this of any use in practice? The nginx command line is something > like: > > /gnu/store/74kz9m850ycxpzkg6dvn9wbd3xjkwwrb-nginx-1.12.0/sbin/nginx -c /gnu/store/5w11ahw113fndvab3xmwcjzs2rw56sbh-nginx-config/bayfront.conf -p /var/run/nginx > > and the configuration file in /gnu/store is immutable, so “nginx -s > reload” does nothing. Actually, my goal was to use this after a certificate renewal. There was going to be other patches on the certbot service as well :) And after a certificate renewal, the names of the certificates don't change (AFAIK they are still in /etc). So I think it would work. But indeed, I didn't think about the main configuration file :/ > If the action took an argument, we could do: > > herd reconfigure nginx /gnu/store/…-new-config.conf > > which would translate to: > > nginx -s reload -c /gnu/store/…-new-config.conf > > Probably our best option. I don't see the point. If the service has already been reloaded by the 'guix system reconfigure' command (let's assume it does, but I know it doesn't currently reload nor restart sevices...), why would a user want to reload it again with the 'herd' command? Or maybe you want this feature as a workaround while the 'guix system reconfigure' that reloads services isn't implemented? Anyway, I think the argument should be optional, so that if there are none, the current configuration file is used. That will be useful for certificates anyway, or for other kinds of configuration files that aren't in the store. > Otherwise, I think we’d have to move the config to a fixed location, say > /etc/nginx, for “nginx -s reload” to have any effect. However I don’t > quite like the use of /etc. Thoughts? I don't like it either :) 'reload' definitely has to support configuration files that are in the store! > Does Dovecot have the same problem? Yes. (But Prosody doesn't.) Clément From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 04:25:26 2017 Received: (at 26830) by debbugs.gnu.org; 12 May 2017 08:25:26 +0000 Received: from localhost ([127.0.0.1]:39664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d95t6-0000L9-Pi for submit@debbugs.gnu.org; Fri, 12 May 2017 04:25:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48673) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d95t5-0000Kv-0K for 26830@debbugs.gnu.org; Fri, 12 May 2017 04:25:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d95sv-0008Q6-2z for 26830@debbugs.gnu.org; Fri, 12 May 2017 04:25:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d95su-0008Q0-Ve; Fri, 12 May 2017 04:25:13 -0400 Received: from [193.50.110.203] (port=45990 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1d95su-0006Mr-5c; Fri, 12 May 2017 04:25:12 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur Subject: Re: bug#26830: Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <874lwrq9em.fsf@lassieur.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Fri, 12 May 2017 10:25:09 +0200 In-Reply-To: <874lwrq9em.fsf@lassieur.org> (=?utf-8?Q?=22Cl=C3=A9ment?= Lassieur"'s message of "Fri, 12 May 2017 01:08:17 +0200") Message-ID: <87inl6trbu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Heya, Cl=C3=A9ment Lassieur skribis: > Ludovic Court=C3=A8s writes: [...] >> However, I think =E2=80=98reload=E2=80=99 might be confusing since in fa= ct it doesn=E2=80=99t >> load Scheme code, contrary to what =E2=80=9Cherd load root foo.scm=E2=80= =9D does (maybe >> that=E2=80=99s what you meant?). In fact it=E2=80=99s closer to what = =E2=80=9Cherd restart >> foo=E2=80=9D does. >> >> What about changing the name to =E2=80=98reconfigure=E2=80=99 or =E2=80= =98upgrade=E2=80=99 to avoid the >> confusion? > > I think it's going to be even more confusing because the other init > systems (systemd, sysvinit) all call it 'reload'. And, well, people are > probably more familiar with Systemd's 'reload' than with Shepherd's > 'reload root' :) WDYT? I think it=E2=80=99s a valid argument! However, if the choice is between internal consistency (on the use of the word =E2=80=9Cload=E2=80=9D in Shep= herd commands) and the rule of least surprise (choosing command names similar to those of other programs), I would favor internal consistency, I think. WDYT? We have a nice bike shed to paint here. :-) >> Some comments: >> >> + #:actions (make-actions >> + (reload >> + "Reload the service's configuration f= iles." >> + #$(shepherd-service-reload service)))= ))))) >> >> Here I think we should only define the action when it has a non-#f >> value. That way we can distinguish between services that have a useful >> reload/reconfigure/upgrade action and those that don=E2=80=99t; in the l= atter >> case, we simply use =E2=80=98restart=E2=80=99 when upgrading. > > Ok. But right now IIRC we don't even use restart after a system > reconfigure, probably because some services can't be restarted safely. Currently =E2=80=98guix system reconfigure=E2=80=99 (specifically =E2=80=98upgrade-shepherd-services=E2=80=99) reloads and starts all service= s that are currently stopped, on the grounds that it would not be safe/desirable to simply stop any running service. > Would that be why we need a 'reload/reconfigure/upgrade' for them? =E2=80=98upgrade-shepherd-services=E2=80=99 could check whether a service h= as an =E2=80=98upgrade=E2=80=99 action. If it does, it could call that action un= conditionally since that action would semantically have the same effect has stop/unload/load/start, except that it does that =E2=80=9Clive=E2=80=9D, wi= thout stopping anything. >> Regarding nginx: >> >> + (stop (nginx-action "-s" "stop")) >> + (reload (nginx-action "-s" "reload")))))))) >> >> Is this of any use in practice? The nginx command line is something >> like: >> >> /gnu/store/74kz9m850ycxpzkg6dvn9wbd3xjkwwrb-nginx-1.12.0/sbin/nginx -c= /gnu/store/5w11ahw113fndvab3xmwcjzs2rw56sbh-nginx-config/bayfront.conf -p = /var/run/nginx >> >> and the configuration file in /gnu/store is immutable, so =E2=80=9Cnginx= -s >> reload=E2=80=9D does nothing. > > Actually, my goal was to use this after a certificate renewal. There > was going to be other patches on the certbot service as well :) And > after a certificate renewal, the names of the certificates don't change > (AFAIK they are still in /etc). Indeed. > So I think it would work. But indeed, I didn't think about the main > configuration file :/ Yeah. Sorry for dropping a fly in the ointment. :-/ >> If the action took an argument, we could do: >> >> herd reconfigure nginx /gnu/store/=E2=80=A6-new-config.conf >> >> which would translate to: >> >> nginx -s reload -c /gnu/store/=E2=80=A6-new-config.conf >> >> Probably our best option. > > I don't see the point. If the service has already been reloaded by the > 'guix system reconfigure' command (let's assume it does, but I know it > doesn't currently reload nor restart sevices...), why would a user want > to reload it again with the 'herd' command? Or maybe you want this > feature as a workaround while the 'guix system reconfigure' that reloads > services isn't implemented? Sorry, I wasn=E2=80=99t clear. Action can take arguments; most don=E2=80= =99t, but some do (like =E2=80=98herd start cow-store /mnt=E2=80=99 when installing GuixSD= .) What I=E2=80=99m suggesting here is to add one/several arguments to this reload/upgrade action. The meaning of these arguments would be defined by the service itself. For nginx, there could be one argument (the config file) or two (the config file and the nginx executable file name). The reload/upgrade action would do =E2=80=9Cnginx -s reload -c =E2=80=A6=E2=80=9D and so on. The =E2=80=98upgrade-shepherd-services=E2=80=99 procedure would automatical= ly call the reload/upgrade action with the right arguments. For that, it needs to know what the arguments are. An option would be to add an =E2=80=98upgrade-arguments=E2=80=99 field to that would = return the arguments to pass to the upgrade action. Does that make sense? > Anyway, I think the argument should be optional, so that if there are > none, the current configuration file is used. That will be useful for > certificates anyway, or for other kinds of configuration files that > aren't in the store. We could do that too. My thought was that the primary consumer of this action would be =E2=80=98guix system reconfigure=E2=80=99 and not the user. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 04:57:56 2017 Received: (at 26830) by debbugs.gnu.org; 12 May 2017 08:57:56 +0000 Received: from localhost ([127.0.0.1]:39711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d96OY-00017F-5u for submit@debbugs.gnu.org; Fri, 12 May 2017 04:57:56 -0400 Received: from mail.lassieur.org ([83.152.10.219]:58720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d96OW-000176-2h for 26830@debbugs.gnu.org; Fri, 12 May 2017 04:57:52 -0400 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id db8e384e (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 12 May 2017 08:57:47 +0000 (UTC) References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <874lwrq9em.fsf@lassieur.org> <87inl6trbu.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#26830: Allow services to implement a 'reload' action In-reply-to: <87inl6trbu.fsf@gnu.org> Date: Fri, 12 May 2017 10:57:47 +0200 Message-ID: <871sruqwok.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ludovic Courtès writes: > Heya, > > Clément Lassieur skribis: > >> Ludovic Courtès writes: > > [...] > >>> However, I think ‘reload’ might be confusing since in fact it doesn’t >>> load Scheme code, contrary to what “herd load root foo.scm” does (maybe >>> that’s what you meant?). In fact it’s closer to what “herd restart >>> foo” does. >>> >>> What about changing the name to ‘reconfigure’ or ‘upgrade’ to avoid the >>> confusion? >> >> I think it's going to be even more confusing because the other init >> systems (systemd, sysvinit) all call it 'reload'. And, well, people are >> probably more familiar with Systemd's 'reload' than with Shepherd's >> 'reload root' :) WDYT? > > I think it’s a valid argument! However, if the choice is between > internal consistency (on the use of the word “load” in Shepherd > commands) and the rule of least surprise (choosing command names similar > to those of other programs), I would favor internal consistency, I > think. WDYT? Ok! I like 'upgrade'. >>> If the action took an argument, we could do: >>> >>> herd reconfigure nginx /gnu/store/…-new-config.conf >>> >>> which would translate to: >>> >>> nginx -s reload -c /gnu/store/…-new-config.conf >>> >>> Probably our best option. >> >> I don't see the point. If the service has already been reloaded by the >> 'guix system reconfigure' command (let's assume it does, but I know it >> doesn't currently reload nor restart sevices...), why would a user want >> to reload it again with the 'herd' command? Or maybe you want this >> feature as a workaround while the 'guix system reconfigure' that reloads >> services isn't implemented? > > Sorry, I wasn’t clear. Action can take arguments; most don’t, but some > do (like ‘herd start cow-store /mnt’ when installing GuixSD.) What I’m > suggesting here is to add one/several arguments to this reload/upgrade > action. The meaning of these arguments would be defined by the service > itself. > > For nginx, there could be one argument (the config file) or two (the > config file and the nginx executable file name). The reload/upgrade > action would do “nginx -s reload -c …” and so on. > > The ‘upgrade-shepherd-services’ procedure would automatically call the > reload/upgrade action with the right arguments. For that, it needs to > know what the arguments are. An option would be to add an > ‘upgrade-arguments’ field to that would return the > arguments to pass to the upgrade action. > > Does that make sense? Yes! Thank you :) From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 28 15:34:38 2018 Received: (at 26830) by debbugs.gnu.org; 28 Jan 2018 20:34:39 +0000 Received: from localhost ([127.0.0.1]:46783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eftew-0003OE-PK for submit@debbugs.gnu.org; Sun, 28 Jan 2018 15:34:38 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:37428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efteu-0003O5-Q0 for 26830@debbugs.gnu.org; Sun, 28 Jan 2018 15:34:37 -0500 Received: from localhost (178.113.251.209.wireless.dyn.drei.com [178.113.251.209]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 1653C3360375; Sun, 28 Jan 2018 21:34:33 +0100 (CET) Date: Sun, 28 Jan 2018 21:34:30 +0100 From: Danny Milosavljevic To: =?ISO-8859-1?Q?Cl=E9ment?= Lassieur Subject: Re: bug#26830: Allow services to implement a 'reload' action Message-ID: <20180128213430.33175f51@scratchpost.org> In-Reply-To: <871sruqwok.fsf@lassieur.org> References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <874lwrq9em.fsf@lassieur.org> <87inl6trbu.fsf@gnu.org> <871sruqwok.fsf@lassieur.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26830 Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= , 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Any news on this reload action patchset? From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 28 18:23:15 2018 Received: (at 26830) by debbugs.gnu.org; 28 Jan 2018 23:23:15 +0000 Received: from localhost ([127.0.0.1]:46913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efwI7-0004gG-69 for submit@debbugs.gnu.org; Sun, 28 Jan 2018 18:23:15 -0500 Received: from mail.lassieur.org ([83.152.10.219]:39674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efwI4-0004g5-Vt for 26830@debbugs.gnu.org; Sun, 28 Jan 2018 18:23:13 -0500 Received: from rodion (88.191.118.83 [88.191.118.83]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 04748077 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Sun, 28 Jan 2018 23:23:11 +0000 (UTC) References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <874lwrq9em.fsf@lassieur.org> <87inl6trbu.fsf@gnu.org> <871sruqwok.fsf@lassieur.org> <20180128213430.33175f51@scratchpost.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Danny Milosavljevic Subject: Re: bug#26830: Allow services to implement a 'reload' action In-reply-to: <20180128213430.33175f51@scratchpost.org> Date: Mon, 29 Jan 2018 00:23:10 +0100 Message-ID: <87inbl4lgh.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Danny Milosavljevic writes: > Any news on this reload action patchset? I didn't find time to work on it. It's still on my todo list but if anyone wants to do it, please go ahead. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 11 18:00:17 2018 Received: (at 26830) by debbugs.gnu.org; 11 Jul 2018 22:00:17 +0000 Received: from localhost ([127.0.0.1]:56017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdN9k-0005Yu-0D for submit@debbugs.gnu.org; Wed, 11 Jul 2018 18:00:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdN9h-0005R2-Sp for 26830@debbugs.gnu.org; Wed, 11 Jul 2018 18:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdN9b-0005qM-Q3 for 26830@debbugs.gnu.org; Wed, 11 Jul 2018 18:00:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdN9W-0005nY-FK; Wed, 11 Jul 2018 18:00:02 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=59744 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fdN9W-0005rI-3y; Wed, 11 Jul 2018 18:00:02 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Mathieu Othacehe Subject: Re: bug#26830: Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> Date: Thu, 12 Jul 2018 00:00:00 +0200 In-Reply-To: <87vap7kryj.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 11 May 2017 23:24:04 +0200") Message-ID: <87bmbdigbj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26830 Cc: =?utf-8?Q?Cl=C3=A9ment?= Lassieur , 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hello! ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > The logical next step of this series will be to have the service upgrade > code in =E2=80=98guix system reconfigure=E2=80=99 invoke this action when= it is defined. > That will be awesome. > > Some comments: > > + #:actions (make-actions > + (reload > + "Reload the service's configuration fi= les." > + #$(shepherd-service-reload service))))= )))) > > Here I think we should only define the action when it has a non-#f > value. That way we can distinguish between services that have a useful > reload/reconfigure/upgrade action and those that don=E2=80=99t; in the la= tter > case, we simply use =E2=80=98restart=E2=80=99 when upgrading. > > Regarding nginx: > > + (stop (nginx-action "-s" "stop")) > + (reload (nginx-action "-s" "reload")))))))) > > Is this of any use in practice? The nginx command line is something > like: > > /gnu/store/74kz9m850ycxpzkg6dvn9wbd3xjkwwrb-nginx-1.12.0/sbin/nginx -c = /gnu/store/5w11ahw113fndvab3xmwcjzs2rw56sbh-nginx-config/bayfront.conf -p /= var/run/nginx > > and the configuration file in /gnu/store is immutable, so =E2=80=9Cnginx = -s > reload=E2=80=9D does nothing. If the action took an argument, we could d= o: > > herd reconfigure nginx /gnu/store/=E2=80=A6-new-config.conf > > which would translate to: > > nginx -s reload -c /gnu/store/=E2=80=A6-new-config.conf FWIW, with the patch at , adding such actions becomes easy (it=E2=80=99s a generalization of what you did in this patch series.) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 12 09:06:25 2018 Received: (at 26830) by debbugs.gnu.org; 12 Jul 2018 13:06:25 +0000 Received: from localhost ([127.0.0.1]:56473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdbIf-0000zp-42 for submit@debbugs.gnu.org; Thu, 12 Jul 2018 09:06:25 -0400 Received: from mail.lassieur.org ([83.152.10.219]:40604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fdbIc-0000zg-Hb for 26830@debbugs.gnu.org; Thu, 12 Jul 2018 09:06:22 -0400 Received: from newt (smtp.parrot.biz [62.23.167.188]) by mail.lassieur.org (OpenSMTPD) with ESMTPSA id a3db07a0 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Thu, 12 Jul 2018 13:06:21 +0000 (UTC) References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <87bmbdigbj.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#26830] Allow services to implement a 'reload' action In-reply-to: <87bmbdigbj.fsf@gnu.org> Date: Thu, 12 Jul 2018 15:06:20 +0200 Message-ID: <874lh438oj.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , 26830@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > FWIW, with the patch at , adding such > actions becomes easy (it=E2=80=99s a generalization of what you did in th= is > patch series.) > > Ludo=E2=80=99. Hehe thanks for the reminder, I'll consider working on this again soon :-) Cl=C3=A9ment From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 23 09:02:48 2022 Received: (at 26830) by debbugs.gnu.org; 23 Mar 2022 13:02:48 +0000 Received: from localhost ([127.0.0.1]:43092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX0dU-00010N-Af for submit@debbugs.gnu.org; Wed, 23 Mar 2022 09:02:48 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:41566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX0dS-000107-4N for 26830@debbugs.gnu.org; Wed, 23 Mar 2022 09:02:46 -0400 Received: by mail-wr1-f48.google.com with SMTP id h23so2011246wrb.8 for <26830@debbugs.gnu.org>; Wed, 23 Mar 2022 06:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=vgcpWPHurYjpdf3yivYW1eD3K+10w16GyiAtSjyV6BI=; b=LXTSe2gyold0SgU9WhIpZKNrGVLeTTQ4I/k5fFE/OE33TK3zpCrfSUIwUfdVbW9Kfl UumfH/IplvGDbuqiWN9rOYkKk8hoEB0rn3whLSqKqDBaQyYj+Rz6UKESBEn+R0fPOVSe um9zUNQq6lCnqYQYcQ8S+F2+DS1GzqbJ6+KD26VZLZixwPHiE2jeUReNH00jWijEIiVr 3gefw3tzW1hp1GcNE2o+9FyBMbVb+IkscmZwAd6reHF/PxQRrJC+gFr6WdnkFOmQgs7B HppPZUgzap03OonQYOiEOfGD7DSEPyVv3/nlrLSrAZSytumwXijw9ifTKLZQTroIokSh fHxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=vgcpWPHurYjpdf3yivYW1eD3K+10w16GyiAtSjyV6BI=; b=jAzGQPY+V5CrvUhtdXg1Ja9j5UElggzyaukSo8IsPoyXJYYsjCFQ5gQkUpBG37hxdA KdKKDV8aSvtUspko59hHS95jvTmq1YYqyRflSqTZPOwSxzvzP6TaayaOE/sQxGnniGXC oV/wo0afC77CN9Z+UFYQ2w4wUnrEd9oCG8IxKof6hmXaxOC6e67W989ad8XiicYM5zI7 TwkV7PIt8hZbjR5uLSQBkg8ePEpVZbijWnsjC81O42tM5XA5eutDoQmadVeat/3qOYr8 F7gBMmUPASmLbvUEvx0SLP6zdxy42t0VdpfcX1AIT/O+PIBVP3zA3p/2tH5ZQ8U+oFJP fotQ== X-Gm-Message-State: AOAM532ybCtzHa0Zysb3A6EtjCLvV19WLx97OxYWfFykulToHdiPbndp NCCruQxVJPaJ3wLislOLHh68oOguL4Y= X-Google-Smtp-Source: ABdhPJyhB+GtnOm7A36qrzbMY4L2ez3mqTEgjfgU6GFFJsxqiwjBZOjl4RH86e93EwOzokv8jCL6PQ== X-Received: by 2002:a5d:5255:0:b0:203:ec9c:6d5e with SMTP id k21-20020a5d5255000000b00203ec9c6d5emr25315046wrc.70.1648040560162; Wed, 23 Mar 2022 06:02:40 -0700 (PDT) Received: from lili (client-eduroam632.canalip.upmc.fr. [134.157.122.122]) by smtp.gmail.com with ESMTPSA id v14-20020a7bcb4e000000b0034492fa24c6sm3994510wmj.34.2022.03.23.06.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Mar 2022 06:02:39 -0700 (PDT) From: zimoun To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: bug#26830: Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <87bmbdigbj.fsf@gnu.org> Date: Wed, 23 Mar 2022 13:56:32 +0100 In-Reply-To: <87bmbdigbj.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 12 Jul 2018 00:00:00 +0200") Message-ID: <86lex0zv27.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , 26830@debbugs.gnu.org, =?utf-8?Q?Cl=C3=A9ment?= Lassieur X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, This old patch [1] is=E2=80=A6 old! :-) 1: On Thu, 12 Jul 2018 at 00:00, ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > FWIW, with the patch at , adding such > actions becomes easy (it=E2=80=99s a generalization of what you did in th= is > patch series.) Considering this merged #32128 [1]: --8<---------------cut here---------------start------------->8--- Done in Shepherd commit 5ab8cbc9bcfce586a5389ad95a65f011d02bd289. --8<---------------cut here---------------end--------------->8--- 1: What is then the status of this patch adding =E2=80=99upgrade=E2=80=99? Do= es it still make sense? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 24 04:41:57 2022 Received: (at 26830) by debbugs.gnu.org; 24 Mar 2022 08:41:57 +0000 Received: from localhost ([127.0.0.1]:46757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXJ2b-0000AZ-5i for submit@debbugs.gnu.org; Thu, 24 Mar 2022 04:41:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXJ2Z-0000A8-58 for 26830@debbugs.gnu.org; Thu, 24 Mar 2022 04:41:55 -0400 Received: from [2001:470:142:3::e] (port=52292 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXJ2T-0008Kn-Nk; Thu, 24 Mar 2022 04:41:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=0TXtcOiypE5kG8J61m090pnDXSd8FVDoJ52eiKvzJlA=; b=W2LolIuBSPLBlP0aeifA iJO8Xlf7qqTAGEXQBfUCwU1w3Qdc9C9qO1TyexaZAopVsBhizJJ83BB4AGLPFlV5o5JbgfKDUvKJG YbcXvSKG9FcGSuEE1pSRSpfHCOfn41arN0j1Rll1s53SHUlmDlhTKs/c8bi6AaEP7ifoVoekDFVIj 7/82ij4qR3hNaMjkSLYnVGKJz3v2RPrEi0iqZ0QjpcndAjWiQW0PsRYTATS6FxRb+syDGqCnwzj3e AY4aovqITF5gm8ffejl2pUP+FFd44C7/On5D0L4xG85Leo68msvINLQ4JKK70GGCqOLbh1a8DDZgu rUw4VrFf7VU6Eg==; Received: from [193.50.110.177] (port=51492 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXJ2T-00024O-9R; Thu, 24 Mar 2022 04:41:49 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: bug#26830: Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <87bmbdigbj.fsf@gnu.org> <86lex0zv27.fsf_-_@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 24 Mar 2022 09:41:46 +0100 In-Reply-To: <86lex0zv27.fsf_-_@gmail.com> (zimoun's message of "Wed, 23 Mar 2022 13:56:32 +0100") Message-ID: <87wngjeo8l.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , 26830@debbugs.gnu.org, =?utf-8?Q?Cl=C3=A9ment?= Lassieur X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun skribis: > What is then the status of this patch adding =E2=80=99upgrade=E2=80=99? = Does it still > make sense? I think having =E2=80=98reload=E2=80=99 actions for nginx, dovecot, etc. wh= ereby the daemon reloads its config without stopping still makes sense. I wonder if the patch as-is would achieve that though, because in general those daemons are run with =E2=80=98-c /gnu/store/=E2=80=A6-config= =E2=80=99, so reloading would just reload the same file. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 24 09:53:12 2022 Received: (at 26830) by debbugs.gnu.org; 24 Mar 2022 13:53:12 +0000 Received: from localhost ([127.0.0.1]:47073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXNto-0004J8-0E for submit@debbugs.gnu.org; Thu, 24 Mar 2022 09:53:12 -0400 Received: from mail-lj1-f180.google.com ([209.85.208.180]:38847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXNtl-0004Iu-E1 for 26830@debbugs.gnu.org; Thu, 24 Mar 2022 09:53:10 -0400 Received: by mail-lj1-f180.google.com with SMTP id s25so6276392lji.5 for <26830@debbugs.gnu.org>; Thu, 24 Mar 2022 06:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=e5Lnk5u5nzITQ4995BSv2NskpFMBbEuxlecfJgrPOAk=; b=OHiXzlIwXMQQmIALH8V+ebvRJZwnFmtKcCd31DN+ADRTPHRxe7X90bkhSjgWnCP3j/ mKdJLjUZBb8fP6uappOtnTWenKlwfHzwTWBoxk5/JcO2kuAmmelHd5N6MPS8vSJEMZJ3 TA4ZrPJFf5DtRK1IopmcZUgdvaMTC4VieCiP9W2cIAUs9yCrrGvUjwgGkC7xHi+eAzrN JS1ajAiV1VRy5bND7sJ8z7d/Ap/4tXA6ZH9y4pLglWqrpxOs3Aipgcd1DyDNDMri2q2u NFbbc8VooXoFt1uus0vIkRwACiXMsMtQ23/9QNL7Pp8uSZglXFHBlJtvfl1EZpTnEIqK VxNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=e5Lnk5u5nzITQ4995BSv2NskpFMBbEuxlecfJgrPOAk=; b=jxmmAjpkIV9r9CjOQbkHbiqsXaM4kyJ/qhetwQsfkmDqSlo5sq+Z+KP2l1zdk2rqKQ 6Wnr3DTFl1o48TZkbgVgti3vrcP7moHf3HhNoHnoTITBashezoHs3txWINRSqGTr8mPB xYQIn3MTDWpJDoFKEFHRIBNUiyocmvpF1xaNFDOYKE7KOM13HcEGIssdUc9pcLFdIZCu WB6bZ/Vrv0xOm16ZO5SHHWG1VVD74pGqcyv81Vxi5Z6cS3VjbHWX7kS1ALiHiPzjtlaO O5eI9OAWIkerXkHR6JZT0VWGJzvSo8qETKXZNS0Dq6i9m76F9CrP+5eJ0GRskKpzLeUw zmEg== X-Gm-Message-State: AOAM532vAJmPxben4PyC16yLEW1ZPnepVOKUvUxRI9f/cWyn9jB/PWia UCBTrOrPjZTbncyIhJe8ajo= X-Google-Smtp-Source: ABdhPJyQSKN5wtAx954HkE9B+OL4h0YsgY3QFyYmOAf4ESyjbEfXmyzq6mbbGR0w/gN9d9o9lEk8iw== X-Received: by 2002:a2e:a7ca:0:b0:249:85d4:faec with SMTP id x10-20020a2ea7ca000000b0024985d4faecmr4020755ljp.505.1648129982879; Thu, 24 Mar 2022 06:53:02 -0700 (PDT) Received: from guixsd ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id s12-20020ac25fac000000b004435e2e0a08sm346057lfe.251.2022.03.24.06.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 06:53:01 -0700 (PDT) From: Oleg Pykhalov To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#26830] Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <87bmbdigbj.fsf@gnu.org> <86lex0zv27.fsf_-_@gmail.com> <87wngjeo8l.fsf@gnu.org> Date: Thu, 24 Mar 2022 16:52:58 +0300 In-Reply-To: <87wngjeo8l.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 24 Mar 2022 09:41:46 +0100") Message-ID: <87lewztq2t.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , =?utf-8?Q?Cl=C3=A9ment?= Lassieur , 26830@debbugs.gnu.org, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ludovic Court=C3=A8s writes: [=E2=80=A6] > I wonder if the patch as-is would achieve that though, because in > general those daemons are run with =E2=80=98-c /gnu/store/=E2=80=A6-confi= g=E2=80=99, so > reloading would just reload the same file. Maybe we could switch to another practice in service definitions: =E2=80=98/gnu/store/...-some-program/bin/some-program -c /etc/some-config= =E2=80=99 $ ls -l /etc/static /etc/static -> /gnu/store/...-etc/etc $ ls -l /etc/some-config /etc/some-config -> /etc/static/some-config --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmI8d7oUHGdvLndpZ3Vz dEBnbWFpbC5jb20ACgkQFn+OpQAa+px7fA/+MWua88mLyrEXsZeoyXDcVLkRmSO6 nOyXrevrVke/1f0N8w/pTr2JiMLAd9Ao1Rfk2LeBdd/gd90M2nBy6494xeT2ADkD 4UxnJel2ZHEh0lEHFjLZnoB5AHc+kRNDWWZBEW1PBg0sGl4mkWOYVdsYnffGnBLd LWqjrGu0LZA7KXkU8kD0luTAJgmU4EVu3oFAxBuG8kxk4dNgcXsC7bUHYgaKpgJS MPC4ai57x2qHICbkXV4HJ5W5dJXxdntF+2SyXKykzP1adOEEDWOB9YAEOqWoRbSP i6lG1Gkc0FrtuCcJiA2fWKl5IviKxjSvm6LmZcN8kuqZTW9j3jzWANU6z7BxHU5V YqCyBpHluk3b1oegJWteGINLd6kjyuDCIYE/7YCb2mxPiWK+Ql0d7M6EZB2MPzsh vN3QXjOlUbI12LGS4L0rMXPSxL01N21NVbzEZRB8WZQldwYR2FvCXUF7oEQrpeb1 OGDxutGJdHwYI/sFvwX1ksqmyD+XnTkc/4RdA81xFnvPmChuN6HythR7xi+w0A0g Z5HkJlbFCURbuzAzip4b3a7QGNHwgsNEabUj+mTIDVHVETYMVryeIfOxjOwUWmnn BhEHIK4i61IfUUFnpM+WSzyg1THRCO1+GyqRPH8cJYf/6GWMXI9PHsDGVWEMX7oG YBaJ2jiC9BToe3A= =xZPV -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 26 16:46:30 2022 Received: (at 26830) by debbugs.gnu.org; 26 Mar 2022 20:46:30 +0000 Received: from localhost ([127.0.0.1]:54749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYDIs-0004AD-7q for submit@debbugs.gnu.org; Sat, 26 Mar 2022 16:46:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYDIq-0004A1-FR for 26830@debbugs.gnu.org; Sat, 26 Mar 2022 16:46:28 -0400 Received: from [2001:470:142:3::e] (port=60432 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYDIi-0001NE-Hu; Sat, 26 Mar 2022 16:46:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=+XLAa3/rh/StRU0kkvgadJPh9JFv5TNXJurR+rYZTTM=; b=noGNjSz+ipV++WrdhqA4 yoka5I6MdQz1wA6fGcQr5ic2p2o+yg6Ls/v7VYAVzANjNCRgfFtBIr11LzaP8dfkrwAVEugxUAfCC crcMx/jqRb7bxwc9rFBV6Oq5fQW2bYMjZ4rl1I/OtW2oXSBC/OEvXbZMjro+kzTFnLJj5kvGGmKUT iGnl3kQLj58ufGp748DIKPKYmPCu8byp3GyuOoJJ43pfKI69CS1PM79Bi1p66I2YWh787WrkCfDwJ +kY5q+k+PbMU2JyNG+LgUHfeUujn04q3+de/nXiIgZwsxZ8049OK7CRu2BGVG7qmiPeaV3lnr4C1p er165Ic4cVBFVg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64104 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYDIi-00076B-5r; Sat, 26 Mar 2022 16:46:20 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Oleg Pykhalov Subject: Re: [bug#26830] Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <87bmbdigbj.fsf@gnu.org> <86lex0zv27.fsf_-_@gmail.com> <87wngjeo8l.fsf@gnu.org> <87lewztq2t.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 26 Mar 2022 21:46:17 +0100 In-Reply-To: <87lewztq2t.fsf@gmail.com> (Oleg Pykhalov's message of "Thu, 24 Mar 2022 16:52:58 +0300") Message-ID: <87v8w07886.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , =?utf-8?Q?Cl=C3=A9ment?= Lassieur , 26830@debbugs.gnu.org, zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Oleg Pykhalov skribis: > Ludovic Court=C3=A8s writes: > > [=E2=80=A6] > >> I wonder if the patch as-is would achieve that though, because in >> general those daemons are run with =E2=80=98-c /gnu/store/=E2=80=A6-conf= ig=E2=80=99, so >> reloading would just reload the same file. > > Maybe we could switch to another practice in service definitions: > > =E2=80=98/gnu/store/...-some-program/bin/some-program -c /etc/some-config= =E2=80=99 > > $ ls -l /etc/static > /etc/static -> /gnu/store/...-etc/etc > > $ ls -l /etc/some-config > /etc/some-config -> /etc/static/some-config Hmm yes, we could (I think Maxim did that recently for a service, I forgot which one.) I like the clarity of =E2=80=98-c /gnu/store/=E2=80=A6-config=E2=80=99 bett= er than the ambient authority and ambiguity of =E2=80=98/etc/config=E2=80=99, but I guess we ha= ve to made a tradeoff. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 26 17:14:32 2022 Received: (at 26830) by debbugs.gnu.org; 26 Mar 2022 21:14:32 +0000 Received: from localhost ([127.0.0.1]:54762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYDk0-0004sS-8v for submit@debbugs.gnu.org; Sat, 26 Mar 2022 17:14:32 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:39614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYDjy-0004sJ-9A for 26830@debbugs.gnu.org; Sat, 26 Mar 2022 17:14:31 -0400 Received: from [172.20.10.5] ([213.119.168.171]) by albert.telenet-ops.be with bizsmtp id B9ET2700D3iD4dh069ETpg; Sat, 26 Mar 2022 22:14:28 +0100 Message-ID: Subject: Re: [bug#26830] Allow services to implement a 'reload' action From: Maxime Devos To: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Oleg Pykhalov Date: Sat, 26 Mar 2022 22:14:21 +0100 In-Reply-To: <87v8w07886.fsf@gnu.org> References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <87bmbdigbj.fsf@gnu.org> <86lex0zv27.fsf_-_@gmail.com> <87wngjeo8l.fsf@gnu.org> <87lewztq2t.fsf@gmail.com> <87v8w07886.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-3izjk5VvTdMCgJBwX7BA" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648329268; bh=FKXArjYxwzV4jSlpXEcIPHKoQ8W6p/fniXuyQOiR0so=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=j9xy20Rtw0YwHwa1c0Q6gyDbxxAGSZGlJ8CdFv8TSccFtWq/+HyWIHGMLorjaUE9i sN/p4Afr2OoKOri7OCRQ+ep7bELrqiGLwOm2g5KS4cfHR2GviVMW/GmM4n5jGXgOqb YWVvtlMNIGc4T5sYHxn4d7k3Rwj9yPTBzvVjaj8QQ+w6f0vjAvYzz6v2nXWBDUrKof 50Ee5d5ne2qnFhMCqC0+y/Twi60JeRSagPYOGavK2WHhrmmFM+sJXqZ3aUQTefNCMV HPVYucoWZSV0h0RBhWZElyjfbnvgogScBLpkiNqJW5K3gJX716fMHI+1CRSxsrCXwA q+KLf1aQkjNAw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26830 Cc: Mathieu Othacehe , 26830@debbugs.gnu.org, =?ISO-8859-1?Q?Cl=E9ment?= Lassieur , zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-3izjk5VvTdMCgJBwX7BA Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op za 26-03-2022 om 21:46 [+0100]: > I like the clarity of =E2=80=98-c /gnu/store/=E2=80=A6-config=E2=80=99 be= tter than the ambient > authority and ambiguity of =E2=80=98/etc/config=E2=80=99, but I guess we = have to made a > tradeoff. How about something in-between: /run/current-system/SOME-SUBDIRECTORY/etc/config That way, there is less potential for non-atomicity problems caused by individual files in /etc/... Greetings, Maxime. --=-3izjk5VvTdMCgJBwX7BA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYj+CLRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lknAP9/di8O11tSGJU6qInvix7ClEyY JlC7zAZlytKPFroQrwD8CkTXtOs8WMAAglFDktyeG1dyBDaoeFAg1Wl0vrCEjwU= =i+Ac -----END PGP SIGNATURE----- --=-3izjk5VvTdMCgJBwX7BA-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 09:36:41 2022 Received: (at 26830) by debbugs.gnu.org; 29 Mar 2022 13:36:42 +0000 Received: from localhost ([127.0.0.1]:60258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZC1Z-000842-Lk for submit@debbugs.gnu.org; Tue, 29 Mar 2022 09:36:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZC1Y-00083p-7n for 26830@debbugs.gnu.org; Tue, 29 Mar 2022 09:36:40 -0400 Received: from [2001:470:142:3::e] (port=35838 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZC1S-0005b1-SG; Tue, 29 Mar 2022 09:36:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=z+/rSJzPaTjGOJuh8j5+gYFpI+4S0LRQfrnoYxpYRh0=; b=GbPY1iqHUNwuPGTDd8Ak 9OYti9PQAHBCJvG7z1t/3L2pwrHfbyeDacgADIbciYyDPUOofc0z9JzbYXuxUnSHOw0YjJwOGe5iA j4cUsleYstxNBiMA0oE0uZdyrCnlVFkyoI2r6Ff0CeJRDsgtEUnybwU8nk9NnZnjSWIsfqHaxFTNL CroQLzsnWCCIhIGy15OMBIVpo0/oEvJ0JYOlNa2IEcZihzeHaPaG0Y+FXq7j3YGM+009KhLBrQfTm 9Yf0V74m7RN1+wW9CxT1mN6wWxStzVf+UAhtBGnoCoxRcDVskA2poCrkhEnPsww0CD2wXjEXgY+L9 EdRAIRxJ0Ifijw==; Received: from [193.50.110.177] (port=51536 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZC1S-00019U-EU; Tue, 29 Mar 2022 09:36:34 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: [bug#26830] Allow services to implement a 'reload' action References: <87d1bjtlpd.fsf@lassieur.org> <86vapa6nyi.fsf@gmail.com> <87vap7kryj.fsf@gnu.org> <87bmbdigbj.fsf@gnu.org> <86lex0zv27.fsf_-_@gmail.com> <87wngjeo8l.fsf@gnu.org> <87lewztq2t.fsf@gmail.com> <87v8w07886.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 29 Mar 2022 15:36:32 +0200 In-Reply-To: (Maxime Devos's message of "Sat, 26 Mar 2022 22:14:21 +0100") Message-ID: <87k0ccyj6n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26830 Cc: Oleg Pykhalov , Mathieu Othacehe , 26830@debbugs.gnu.org, =?utf-8?Q?Cl=C3=A9ment?= Lassieur , zimoun X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op za 26-03-2022 om 21:46 [+0100]: >> I like the clarity of =E2=80=98-c /gnu/store/=E2=80=A6-config=E2=80=99 b= etter than the ambient >> authority and ambiguity of =E2=80=98/etc/config=E2=80=99, but I guess we= have to made a >> tradeoff. > > How about something in-between: > > /run/current-system/SOME-SUBDIRECTORY/etc/config It=E2=80=99s =E2=80=9Cambient authority=E2=80=9D in the same way as /etc. Ludo=E2=80=99.