GNU bug report logs - #26830
Allow services to implement a 'reload' action

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Severity: important; Reported by: Clément Lassieur <clement@HIDDEN>; dated Mon, 8 May 2017 15:26:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 12 Jul 2018 13:06:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 12 09:06:25 2018
Received: from localhost ([127.0.0.1]:56473 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fdbIf-0000zp-42
	for submit <at> 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 <clement@HIDDEN>) id 1fdbIc-0000zg-Hb
 for 26830 <at> 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@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
 <87vap7kryj.fsf@HIDDEN> <87bmbdigbj.fsf@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: [bug#26830] Allow services to implement a 'reload' action
In-reply-to: <87bmbdigbj.fsf@HIDDEN>
Date: Thu, 12 Jul 2018 15:06:20 +0200
Message-ID: <874lh438oj.fsf@HIDDEN>
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 <m.othacehe@HIDDEN>, 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> FWIW, with the patch at <https://bugs.gnu.org/32128>, 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




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 11 Jul 2018 22:00:17 +0000
From debbugs-submit-bounces <at> 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 <at> debbugs.gnu.org>)
	id 1fdN9k-0005Yu-0D
	for submit <at> 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@HIDDEN>) id 1fdN9h-0005R2-Sp
 for 26830 <at> 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@HIDDEN>) id 1fdN9b-0005qM-Q3
 for 26830 <at> 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@HIDDEN>)
 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@HIDDEN>)
 id 1fdN9W-0005rI-3y; Wed, 11 Jul 2018 18:00:02 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Mathieu Othacehe <m.othacehe@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
References: <87d1bjtlpd.fsf@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
 <87vap7kryj.fsf@HIDDEN>
Date: Thu, 12 Jul 2018 00:00:00 +0200
In-Reply-To: <87vap7kryj.fsf@HIDDEN> ("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@HIDDEN>
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 <clement@HIDDEN>,
 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

Hello!

ludo@HIDDEN (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 <https://bugs.gnu.org/32128>, adding such
actions becomes easy (it=E2=80=99s a generalization of what you did in this
patch series.)

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 28 Jan 2018 23:23:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 28 18:23:15 2018
Received: from localhost ([127.0.0.1]:46913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1efwI7-0004gG-69
	for submit <at> 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 <clement@HIDDEN>) id 1efwI4-0004g5-Vt
 for 26830 <at> 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@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
 <87vap7kryj.fsf@HIDDEN> <874lwrq9em.fsf@HIDDEN>
 <87inl6trbu.fsf@HIDDEN> <871sruqwok.fsf@HIDDEN>
 <20180128213430.33175f51@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.3.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
In-reply-to: <20180128213430.33175f51@HIDDEN>
Date: Mon, 29 Jan 2018 00:23:10 +0100
Message-ID: <87inbl4lgh.fsf@HIDDEN>
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?= <ludo@HIDDEN>, 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Danny Milosavljevic <dannym@HIDDEN> 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.




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 28 Jan 2018 20:34:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 28 15:34:38 2018
Received: from localhost ([127.0.0.1]:46783 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eftew-0003OE-PK
	for submit <at> 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 <dannym@HIDDEN>) id 1efteu-0003O5-Q0
 for 26830 <at> 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 <dannym@HIDDEN>
To: =?ISO-8859-1?Q?Cl=E9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
Message-ID: <20180128213430.33175f51@HIDDEN>
In-Reply-To: <871sruqwok.fsf@HIDDEN>
References: <87d1bjtlpd.fsf@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
 <87vap7kryj.fsf@HIDDEN> <874lwrq9em.fsf@HIDDEN>
 <87inl6trbu.fsf@HIDDEN> <871sruqwok.fsf@HIDDEN>
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?= <ludo@HIDDEN>, 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Any news on this reload action patchset?




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 12 May 2017 08:57:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 12 04:57:56 2017
Received: from localhost ([127.0.0.1]:39711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d96OY-00017F-5u
	for submit <at> 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 <clement@HIDDEN>) id 1d96OW-000176-2h
 for 26830 <at> 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@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
 <87vap7kryj.fsf@HIDDEN> <874lwrq9em.fsf@HIDDEN>
 <87inl6trbu.fsf@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
In-reply-to: <87inl6trbu.fsf@HIDDEN>
Date: Fri, 12 May 2017 10:57:47 +0200
Message-ID: <871sruqwok.fsf@HIDDEN>
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 <m.othacehe@HIDDEN>, 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Ludovic Courtès <ludo@HIDDEN> writes:

> Heya,
>
> Clément Lassieur <clement@HIDDEN> skribis:
>
>> Ludovic Courtès <ludo@HIDDEN> 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 <shepherd-service> that would return the
> arguments to pass to the upgrade action.
>
> Does that make sense?

Yes!  Thank you :)




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 12 May 2017 08:25:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 12 04:25:26 2017
Received: from localhost ([127.0.0.1]:39664 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d95t6-0000L9-Pi
	for submit <at> 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 <ludo@HIDDEN>) id 1d95t5-0000Kv-0K
 for 26830 <at> 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 <ludo@HIDDEN>) id 1d95sv-0008Q6-2z
 for 26830 <at> 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 <ludo@HIDDEN>)
 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 <ludo@HIDDEN>)
 id 1d95su-0006Mr-5c; Fri, 12 May 2017 04:25:12 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
References: <87d1bjtlpd.fsf@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
 <87vap7kryj.fsf@HIDDEN> <874lwrq9em.fsf@HIDDEN>
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@HIDDEN> (=?utf-8?Q?=22Cl=C3=A9ment?=
 Lassieur"'s message of "Fri, 12 May 2017 01:08:17 +0200")
Message-ID: <87inl6trbu.fsf@HIDDEN>
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 <m.othacehe@HIDDEN>, 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Heya,

Cl=C3=A9ment Lassieur <clement@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> 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 <shepherd-service> 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.




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 11 May 2017 23:08:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 11 19:08:25 2017
Received: from localhost ([127.0.0.1]:39370 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d8xC5-0000KC-8I
	for submit <at> 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 <clement@HIDDEN>) id 1d8xC3-0000K3-8a
 for 26830 <at> 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@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
 <87vap7kryj.fsf@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
In-reply-to: <87vap7kryj.fsf@HIDDEN>
Date: Fri, 12 May 2017 01:08:17 +0200
Message-ID: <874lwrq9em.fsf@HIDDEN>
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 <m.othacehe@HIDDEN>, 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi Ludovic,

Thanks for commenting on this :)

Ludovic Courtès <ludo@HIDDEN> writes:

> Hello!
>
> Mathieu Othacehe <m.othacehe@HIDDEN> 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





Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.
Severity set to 'important' from 'normal' Request was from ludo@HIDDEN (Ludovic Courtès) to control <at> debbugs.gnu.org. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 11 May 2017 21:24:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 11 17:24:18 2017
Received: from localhost ([127.0.0.1]:39212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d8vZK-0007Rm-4L
	for submit <at> 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 <ludo@HIDDEN>) id 1d8vZJ-0007Ra-0a
 for 26830 <at> 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 <ludo@HIDDEN>) id 1d8vZA-00014b-0K
 for 26830 <at> 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 <ludo@HIDDEN>)
 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 <ludo@HIDDEN>)
 id 1d8vZ9-0004un-1n; Thu, 11 May 2017 17:24:07 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Mathieu Othacehe <m.othacehe@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
References: <87d1bjtlpd.fsf@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
Date: Thu, 11 May 2017 23:24:04 +0200
In-Reply-To: <86vapa6nyi.fsf@HIDDEN> (Mathieu Othacehe's message of "Tue,
 09 May 2017 17:37:25 +0200")
Message-ID: <87vap7kryj.fsf@HIDDEN>
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 <at> debbugs.gnu.org,
 =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Hello!

Mathieu Othacehe <m.othacehe@HIDDEN> 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.




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 11 May 2017 12:57:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 11 08:57:36 2017
Received: from localhost ([127.0.0.1]:37805 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d8nex-0006eA-PW
	for submit <at> 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 <m.othacehe@HIDDEN>) id 1d8nev-0006dv-CO
 for 26830 <at> 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 <at> 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@HIDDEN>
 <20170510193137.846-1-clement@HIDDEN> <8760h7rhmm.fsf@HIDDEN>
 <87vap7sh1i.fsf@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: Mathieu Othacehe <m.othacehe@HIDDEN>
To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#26830: [PATCH] services: shepherd: Allow services to
 implement a 'reload' action.
In-reply-to: <87vap7sh1i.fsf@HIDDEN>
Date: Thu, 11 May 2017 14:57:26 +0200
Message-ID: <86shkbzh3d.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 26830
Cc: 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 11 May 2017 12:40:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 11 08:40:29 2017
Received: from localhost ([127.0.0.1]:37798 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d8nOP-0006Ee-8c
	for submit <at> 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 <clement@HIDDEN>) id 1d8nON-0006EV-QE
 for 26830 <at> 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 <at> debbugs.gnu.org>; Thu, 11 May 2017 12:40:25 +0000 (UTC)
References: <86vapa6nyi.fsf@HIDDEN>
 <20170510193137.846-1-clement@HIDDEN> <8760h7rhmm.fsf@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: 26830 <at> debbugs.gnu.org
Subject: Re: bug#26830: [PATCH] services: shepherd: Allow services to
 implement a 'reload' action.
In-reply-to: <8760h7rhmm.fsf@HIDDEN>
Date: Thu, 11 May 2017 14:40:25 +0200
Message-ID: <87vap7sh1i.fsf@HIDDEN>
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 <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Clément Lassieur <clement@HIDDEN> writes:
> Clément Lassieur <clement@HIDDEN> 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}).




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 11 May 2017 07:13:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 11 03:13:09 2017
Received: from localhost ([127.0.0.1]:37523 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d8iHd-0003LS-JH
	for submit <at> 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 <clement@HIDDEN>) id 1d8iHb-0003LI-MI
 for 26830 <at> 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 <at> debbugs.gnu.org>; Thu, 11 May 2017 07:13:05 +0000 (UTC)
References: <86vapa6nyi.fsf@HIDDEN>
 <20170510193137.846-1-clement@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: 26830 <at> debbugs.gnu.org
Subject: Re: bug#26830: [PATCH] services: shepherd: Allow services to
 implement a 'reload' action.
In-reply-to: <20170510193137.846-1-clement@HIDDEN>
Date: Thu, 11 May 2017 09:13:05 +0200
Message-ID: <8760h7rhmm.fsf@HIDDEN>
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 <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Clément Lassieur <clement@HIDDEN> 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}).




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 10 May 2017 19:32:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 10 15:32:01 2017
Received: from localhost ([127.0.0.1]:37106 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d8XL7-0003mM-EM
	for submit <at> 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 <clement@HIDDEN>) id 1d8XL5-0003lq-HL
 for 26830 <at> 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@HIDDEN> <86vapa6nyi.fsf@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Mathieu Othacehe <m.othacehe@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
In-reply-to: <86vapa6nyi.fsf@HIDDEN>
Date: Wed, 10 May 2017 21:31:58 +0200
Message-ID: <87vap8h5jl.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 26830
Cc: 26830 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Mathieu Othacehe <m.othacehe@HIDDEN> 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?




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 10 May 2017 19:31:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 10 15:31:55 2017
Received: from localhost ([127.0.0.1]:37103 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d8XL1-0003m3-7C
	for submit <at> 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 <clement@HIDDEN>) id 1d8XKz-0003lq-FM
 for 26830 <at> 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 <at> debbugs.gnu.org>; Wed, 10 May 2017 19:31:51 +0000 (UTC)
From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= <clement@HIDDEN>
To: 26830 <at> 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@HIDDEN>
X-Mailer: git-send-email 2.12.2
In-Reply-To: <86vapa6nyi.fsf@HIDDEN>
References: <86vapa6nyi.fsf@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 26830
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* gnu/services/shepherd.scm (<shepherd-service>)[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





Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 9 May 2017 15:36:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 09 11:36:54 2017
Received: from localhost ([127.0.0.1]:34333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d87C2-0004tN-BA
	for submit <at> 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 <m.othacehe@HIDDEN>) id 1d87C0-0004tA-TV
 for 26830 <at> 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 <at> 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@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: Mathieu Othacehe <m.othacehe@HIDDEN>
To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
Subject: Re: bug#26830: Allow services to implement a 'reload' action
In-reply-to: <87d1bjtlpd.fsf@HIDDEN>
Date: Tue, 09 May 2017 17:37:25 +0200
Message-ID: <86vapa6nyi.fsf@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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




Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 08 11:28:48 2017
Received: from localhost ([127.0.0.1]:34563 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d7kae-00010a-2z
	for submit <at> 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 <clement@HIDDEN>) id 1d7kac-0000zu-L0
 for 26830 <at> 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 <at> debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC)
From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= <clement@HIDDEN>
To: 26830 <at> 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@HIDDEN>
X-Mailer: git-send-email 2.12.2
In-Reply-To: <20170508152832.4797-1-clement@HIDDEN>
References: <20170508152832.4797-1-clement@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 26830
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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





Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 08 11:28:48 2017
Received: from localhost ([127.0.0.1]:34561 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d7kad-00010S-QV
	for submit <at> 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 <clement@HIDDEN>) id 1d7kab-0000zu-Mm
 for 26830 <at> 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 <at> debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC)
From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= <clement@HIDDEN>
To: 26830 <at> 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@HIDDEN>
X-Mailer: git-send-email 2.12.2
In-Reply-To: <20170508152832.4797-1-clement@HIDDEN>
References: <20170508152832.4797-1-clement@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 26830
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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





Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 08 11:28:47 2017
Received: from localhost ([127.0.0.1]:34559 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d7kad-00010Q-FY
	for submit <at> 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 <clement@HIDDEN>) id 1d7kaa-0000zu-Rl
 for 26830 <at> 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 <at> debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC)
From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= <clement@HIDDEN>
To: 26830 <at> 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@HIDDEN>
X-Mailer: git-send-email 2.12.2
In-Reply-To: <20170508152832.4797-1-clement@HIDDEN>
References: <20170508152832.4797-1-clement@HIDDEN>
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 <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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 <ng0@HIDDEN>
 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@HIDDEN>
 ;;; Copyright © 2017 Christopher Baines <mail@HIDDEN>
+;;; Copyright © 2017 Clément Lassieur <clement@HIDDEN>
 ;;;
 ;;; 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





Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at 26830 <at> debbugs.gnu.org:


Received: (at 26830) by debbugs.gnu.org; 8 May 2017 15:28:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 08 11:28:45 2017
Received: from localhost ([127.0.0.1]:34555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d7kab-000102-63
	for submit <at> 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 <clement@HIDDEN>) id 1d7kaa-0000zu-3N
 for 26830 <at> 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 <at> debbugs.gnu.org>; Mon, 8 May 2017 15:28:42 +0000 (UTC)
From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= <clement@HIDDEN>
To: 26830 <at> 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@HIDDEN>
X-Mailer: git-send-email 2.12.2
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 26830
X-BeenThere: debbugs-submit <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* gnu/services/shepherd.scm (<shepherd-service>)[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





Information forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 May 2017 15:25:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 08 11:25:38 2017
Received: from localhost ([127.0.0.1]:34544 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d7kXa-0000uo-Gc
	for submit <at> 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 <clement@HIDDEN>) id 1d7kXY-0000ub-OU
 for submit <at> 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 <clement@HIDDEN>) id 1d7kXT-0003qm-4F
 for submit <at> 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 <clement@HIDDEN>)
 id 1d7kXT-0003qe-14
 for submit <at> 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 <clement@HIDDEN>) id 1d7kXR-0003K1-PP
 for guix-patches@HIDDEN; Mon, 08 May 2017 11:25:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <clement@HIDDEN>) id 1d7kXO-0003pS-GT
 for guix-patches@HIDDEN; 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 <clement@HIDDEN>)
 id 1d7kXO-0003o2-32
 for guix-patches@HIDDEN; 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 <guix-patches@HIDDEN>; 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 <clement@HIDDEN>
To: guix-patches@HIDDEN
Subject: Allow services to implement a 'reload' action
Date: Mon, 08 May 2017 17:25:18 +0200
Message-ID: <87d1bjtlpd.fsf@HIDDEN>
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 <at> 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 <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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?




Acknowledgement sent to Clément Lassieur <clement@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#26830; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.