GNU bug report logs

#26830 Allow services to implement a 'reload' action

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Full log

Message #58 received at 26830@debbugs.gnu.org (full text, mbox, reply):

Received: (at 26830) by debbugs.gnu.org; 11 Jul 2018 22:00:17 +0000
From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 11 18:00:17 2018
Received: from localhost ([127.0.0.1]:56017 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	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 <ludo@gnu.org>) 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 <ludo@gnu.org>) 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 <ludo@gnu.org>)
 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 <ludo@gnu.org>)
 id 1fdN9W-0005rI-3y; Wed, 11 Jul 2018 18:00:02 -0400
From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Othacehe <m.othacehe@gmail.com>
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: Clément Lassieur <clement@lassieur.org>,
 26830@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -6.0 (------)
Hello!

ludo@gnu.org (Ludovic Courtès) skribis:

> 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.
>
> 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.
>
> 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.  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

FWIW, with the patch at <https://bugs.gnu.org/32128>, adding such
actions becomes easy (it’s a generalization of what you did in this
patch series.)

Ludo’.




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Mon Sep 8 11:43:22 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.