GNU bug report logs - #77109
[feature] [shepherd] Accept multiple services for actions

Previous Next

Package: guix;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 19 Mar 2025 06:04:02 UTC

Severity: normal

Full log


Message #14 received at 77109 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 77109 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: bug#77109: [feature] [shepherd] Accept multiple services for
 actions
Date: Wed, 19 Mar 2025 20:47:25 +0100
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> Tomas Volf <~@wolfsden.cz> skribis:
>
>> I guess it could be special-cased for start, stop, restart, since these
>> three do not take (by default) any arguments (I *think* you can make
>> `start' procedure taking arguments?  I have never tried.).  But for
>> general case, the `service2' is passed as an argument to the action
>> `restart' of service `service1'.
>
> I think we could special-case that on the client side (in ‘herd’) with
> something like:
>
>   herd restart --batch s1 s2 s3
>
> which would restart those services one after the other.
>
> WDYT?

Oh, that could work, nice.  Maybe a little bit more generic?

--8<---------------cut here---------------start------------->8---
herd ACTION --batch s1 s2 s3 [-- args...]
--8<---------------cut here---------------end--------------->8---

Technically that prevents the user from batch-restarting service called
`--', but I would not be surprised if there would be some issues with
that already, so ¯\_(ツ)_/¯.

The default actions (restart, ...) still should probably signal an error
if they get arguments, people (me included) will forget the --batch from
time to time.

>
> Ludo’.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 82 days ago.

Previous Next


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