GNU bug report logs - #23170
Shepherd doesn't restart previously running dependent services

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; Reported by: "Thompson, David" <dthompson2@HIDDEN>; Keywords: fixed; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix is bug-guix@HIDDEN.
bug closed, send any further explanations to 23170 <at> debbugs.gnu.org and "Thompson, David" <dthompson2@HIDDEN> Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 23170) by debbugs.gnu.org; 27 Aug 2018 17:53:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 27 13:53:05 2018
Received: from localhost ([127.0.0.1]:34464 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fuLhJ-000702-Ex
	for submit <at> debbugs.gnu.org; Mon, 27 Aug 2018 13:53:05 -0400
Received: from mail.lassieur.org ([83.152.10.219]:53116)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <clement@HIDDEN>) id 1fuLhH-0006zu-RR
 for 23170 <at> debbugs.gnu.org; Mon, 27 Aug 2018 13:53:04 -0400
Received: from rodion (88.191.118.83 [88.191.118.83])
 by mail.lassieur.org (OpenSMTPD) with ESMTPSA id 030fde39
 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); 
 Mon, 27 Aug 2018 17:51:12 +0000 (UTC)
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN> <87bm9qbjb4.fsf@HIDDEN>
 <871samqcz4.fsf@HIDDEN> <87ftz07s4t.fsf@HIDDEN>
 <7A4A9C8A-E937-44A9-B941-B8263B00093A@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: =?utf-8?Q?Cl=C3=A9ment?= Lassieur <clement@HIDDEN>
To: Carlo Zancanaro <carlo@HIDDEN>
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
In-reply-to: <7A4A9C8A-E937-44A9-B941-B8263B00093A@HIDDEN>
Date: Mon, 27 Aug 2018 19:53:01 +0200
Message-ID: <8736uzbssi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 23170
Cc: 23170 <at> debbugs.gnu.org, ludo@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: -1.0 (-)

Carlo Zancanaro <carlo@HIDDEN> writes:

>>Anyway, it all LGTM, thanks!
>
> Pushed! Thanks for the review.
>
> Carlo

Awesome!  Thanks a lot Carlo for working on this :-)




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

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


Received: (at 23170) by debbugs.gnu.org; 27 Aug 2018 12:42:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 27 08:42:58 2018
Received: from localhost ([127.0.0.1]:33670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fuGrB-0003ch-R6
	for submit <at> debbugs.gnu.org; Mon, 27 Aug 2018 08:42:58 -0400
Received: from mail-pl1-f178.google.com ([209.85.214.178]:32971)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlozancanaro@HIDDEN>) id 1fuGrA-0003cV-3u
 for 23170 <at> debbugs.gnu.org; Mon, 27 Aug 2018 08:42:56 -0400
Received: by mail-pl1-f178.google.com with SMTP id 60-v6so4126438ple.0
 for <23170 <at> debbugs.gnu.org>; Mon, 27 Aug 2018 05:42:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:references:user-agent:from:to:cc:subject:in-reply-to:date
 :message-id:mime-version;
 bh=IM3LWa6XC9huqlu+gLTC6knxA4f+I5hu8Xl5uWjsm3I=;
 b=NBGt90GN2ZwTMdQoKk+jCKwLMvdNm6Jm0ll/NOmVDuYmvRD/g+g/+B3t3A9K5e/zaX
 aXVdifJ3+zDW2AV+bvdGdGr1NGdGEeGPSDmfP5YH9MUJUndiGE5VxmiS/bTMZEZP49Rt
 yQPxTtSOE97kQGX93rz6stGBz/pHr6R+bKzFxXtCUHraKv7d+Tcj6qfZGeIFxKRuS2bp
 iBl5n6k+COThCdK5sZjiD3t9/REe73IrTBv4AFri6mXdev3YQsCwqCd9yiiC9xzDIAeP
 3OYEdSgwFroZ/R2fah64RddNEKVaajcwisS1nBoN19dUQf9F3aJ24m2UJTYCryMNz0zE
 ecvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject
 :in-reply-to:date:message-id:mime-version;
 bh=IM3LWa6XC9huqlu+gLTC6knxA4f+I5hu8Xl5uWjsm3I=;
 b=fT64TC3sTFqAM+PTaJGZ7XyybTUdLayu/UUZfiRbVbHkQ+J1bS0pcP3Qx49fL+6tK5
 NBivBTaOFlQ/vCGV8GtDkyDceqOhXeDNIrBJB33/+P8Zt9k4ncbxkkjQznPSHreJ0Rb5
 /pVMfpjBrRJWzUIcekha90LsnZrn+hKWbRWW+mHa5Ss3rBZZDaHwhfPKpZ4e85NmNKw5
 DFlKxhSOSff321Ppp69OZJ/BihCJy6zOhRa2bWKRfI3mesWaNMw2yqn3PZSd/C7rLlPB
 UCAAlDQu9VOeRILAFtHvkmu4aUjKni4N8e6Vrdyc12SnTJ2SGfPob0qtwz83t+LBbkRe
 vyrw==
X-Gm-Message-State: APzg51C9NbN9GmbbIRCQtP1XgTXNbf4kZ0MvgjsaVbq0eU/djF/j7dsN
 VoiWL69BCgNaMq+HbgnJ4LPtG6oY
X-Google-Smtp-Source: ANB0VdYM/oJBRYTgTW15r8P4/dpagjG8tKqs/kbFBSZjsGF9VyX+jVFOT68zO0BGw/lckm18ebLXIQ==
X-Received: by 2002:a17:902:ba82:: with SMTP id
 k2-v6mr12730794pls.251.1535373769440; 
 Mon, 27 Aug 2018 05:42:49 -0700 (PDT)
Received: from pidgey (210-1-202-160-cpe.spintel.net.au. [210.1.202.160])
 by smtp.gmail.com with ESMTPSA id y4-v6sm16648318pfn.123.2018.08.27.05.42.45
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 27 Aug 2018 05:42:47 -0700 (PDT)
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN> <87bm9qbjb4.fsf@HIDDEN>
 <871samqcz4.fsf@HIDDEN> <87ftz07s4t.fsf@HIDDEN>
 <BC9EC36A-3916-4DB8-B70F-785B692BC4A4@HIDDEN>
 <87o9docboc.fsf@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: Carlo Zancanaro <carlo@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
In-reply-to: <87o9docboc.fsf@HIDDEN>
Date: Mon, 27 Aug 2018 22:42:40 +1000
Message-ID: <87mut8dlq7.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 23170
Cc: 23170 <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.8 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 27 2018, Ludovic Court=C3=A8s wrote:
> I see that you also reverted the patch that removed the=20
> =E2=80=98EINTR-safe=E2=80=99 workaround.  Could you explain why that was=
=20
> necessary?  (It should not be necessary with current Guile=20
> versions.)

I'm not really sure of the details, but as I mentioned on IRC,=20
that commit stopped me from being able to boot. I grafted a new=20
version of the Shepherd and reconfigured my system, and when it=20
came up my screen was filled with messages complaining that it=20
couldn't create things in /dev because they already existed. I=20
tested the commits since the previous release and that was the one=20
that caused my problem.

I'd like to investigate further, but I have no idea what could be=20
causing it. All I have to go on so far is that I think the udev=20
service is getting respawned repeatedly, but I don't know why that=20
commit would cause that problem. After reverting that commit I=20
could successfully boot back into my system and everything is=20
working properly again.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1lpncq7JnOkt+LaeqdyPv9awIbwFAluD8cEACgkQqdyPv9aw
IbzA0RAAjkqR5kU3kf4wTEwk3NsdWOQQxZ37efl4Q5Jm0Z7Uygxj17mYH1paAC84
y9jVNVnOOMqdJz3OsfYyw73KyGo95dQJy9+bUNt3T4ruvVLSnZyNkmSSfQBlme0c
KSar7fvf2wr4oLMHr3q/4YEL0OT48yOFajHI6zDw7PaepFir6xfRK/S6M45x+1FV
Q9byDx+6siWwyH602cqj7nSl8wnhoZia8grbcV9zCz2bWCnR6OAtv1M12IQoKF63
E8xn25s3qdPBcN1p8QpiA0rXdyOZL0L3pFdHELtkWWV4MTxhPyC78J/Yeiz6KQJg
GMTTZ0vb/ikyFizo5yE1fUByKjIAVXYTefAMj/rLiz5uOW96y4UeDxGi4aTBWvyu
C/Jo14UuZr83t9q6qVqR5IKK0qZssN4GH+MrzdMeEj+Pl7rONrq46BFGMerT6lgY
hQdHabZkp934FGjQajfCqHjeMEcHFW8vNSgpIfUhtecVdq0ZN8cYDHZnLK8b2fU/
OBfw2uM8di7384MopGyH7iY5b3XftkaLm3JQArl3FaNkynsRwhoqLFE13gshwe8J
2URC21TO1eR0GBmTntgYg82BNNN9Lz6mPg2FbRKzHfXLKfJFXMhxjc1wY+Z/PpBH
0JVRuqETm5wIcMAhmQo0cZEKvZHc4nqdjOBGSK5RpOositHyZy8=
=O6mm
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 23170) by debbugs.gnu.org; 27 Aug 2018 11:05:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 27 07:05:22 2018
Received: from localhost ([127.0.0.1]:33598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fuFKi-0005lx-Qx
	for submit <at> debbugs.gnu.org; Mon, 27 Aug 2018 07:05:22 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44023)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1fuFKg-0005ll-Kx
 for 23170 <at> debbugs.gnu.org; Mon, 27 Aug 2018 07:05:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1fuFKX-0004rp-GA
 for 23170 <at> debbugs.gnu.org; Mon, 27 Aug 2018 07:05:13 -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]:37054)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1fuFKX-0004rh-Bg; Mon, 27 Aug 2018 07:05:09 -0400
Received: from [193.50.110.186] (port=41534 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1fuFKX-00077p-32; Mon, 27 Aug 2018 07:05:09 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Carlo Zancanaro <carlo@HIDDEN>
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN> <87bm9qbjb4.fsf@HIDDEN>
 <871samqcz4.fsf@HIDDEN> <87ftz07s4t.fsf@HIDDEN>
 <BC9EC36A-3916-4DB8-B70F-785B692BC4A4@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 10 Fructidor an 226 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: Mon, 27 Aug 2018 13:05:07 +0200
In-Reply-To: <BC9EC36A-3916-4DB8-B70F-785B692BC4A4@HIDDEN> (Carlo
 Zancanaro's message of "Mon, 27 Aug 2018 08:05:17 +1000")
Message-ID: <87o9docboc.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: 23170
Cc: 23170 <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 (------)

Hi,

Carlo Zancanaro <carlo@HIDDEN> skribis:

> Pushed! Thanks for the review.

Great!

I see that you also reverted the patch that removed the =E2=80=98EINTR-safe=
=E2=80=99
workaround.  Could you explain why that was necessary?  (It should not
be necessary with current Guile versions.)

Thank you,
Ludo=E2=80=99.




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

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


Received: (at 23170) by debbugs.gnu.org; 26 Aug 2018 22:05:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 26 18:05:52 2018
Received: from localhost ([127.0.0.1]:33474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fu3AN-0003FI-Su
	for submit <at> debbugs.gnu.org; Sun, 26 Aug 2018 18:05:52 -0400
Received: from zancanaro.com.au ([45.76.117.151]:39252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlo@HIDDEN>) id 1fu3AM-0003F3-1o
 for 23170 <at> debbugs.gnu.org; Sun, 26 Aug 2018 18:05:50 -0400
Received: from [10.9.93.34] (unknown [120.17.232.46])
 by zancanaro.com.au (Postfix) with ESMTPSA id C76B323865;
 Sun, 26 Aug 2018 22:05:48 +0000 (UTC)
Date: Mon, 27 Aug 2018 08:05:17 +1000
User-Agent: K-9 Mail for Android
In-Reply-To: <87ftz07s4t.fsf@HIDDEN>
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN> <87bm9qbjb4.fsf@HIDDEN>
 <871samqcz4.fsf@HIDDEN> <87ftz07s4t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Autocrypt: addr=carlo@HIDDEN; keydata=mQENBFfzbucBCADMZUa9GBphulUIP
 3V6Fwn2v26sAgh9RmSt5by6LAeEqmXehz9xxbnrsjQUumXeUssZ4p0JsHCJ1Iy9+lN7clwuGK6DG
 yy8sqPiCDLMnExTXCtL4rQouZCA3LzI9NW+yNk/2eNJU0vdvxFuuIezY8sdLAZQQX6YviHSjVkkb
 7+ZhDTFy2ZAqBiMDJ2Wz8iVWDn7ZPSB53vW9YBFgTBnWkzzCtbrknxGOq9FaFp2N4Pc8BDXaDLKU
 D9JGqUX2Dbqknl2dY8KiifPUbgP5jNiBhsTCUVtZoYxAsFrKd6sd3QDjoy6BL8qZ75nngjNBEwnm
 KK7VploOPkeQqPBSYbAsv61ABEBAAG0J0NhcmxvIFphbmNhbmFybyA8Y2FybG9AemFuY2FuYXJvL
 mlkLmF1PokBPgQTAQIAKAUCV/Nu5wIbAwUJBaOagAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AAC
 gkQCShLEsLiKqKxhgf+MNea6LR4Cj1eF68Hl0A6SUdaF+1wKY38LQjqjCt4355yCs2mSPTNquCAi
 AmVLoizdoy1wb1NhyT3NdqmOTxm9P7JskPxHXPg0uKkdwB1o3w6CghMOED1JACOBr+JOK5zawqoq
 /1+7GhsOx7KvHJpRlK7zk4QQeqE8hD7k5T6QgXR6pYAhl1jVqpANIgp+b0kzQn650pIIzWhMckiu
 TxRCaxqDXUzM17UugFRvp63ZSA8LEyoGeg4bjR8s+bQoTSYhNfVHYgZZgsG2OFphcQ9EXQ33Occl
 J+k3sabjOgAPEFZ1YHE0N0hpqTUSM36ZOLFJdn3ggZeT/ijdrMsp7XxWLkBDQRX827nAQgAqMoK+
 5/59bB2DIvCHuKW0KJ9PM1CinTJe8hX4/bJu0xJehNMU01OL7gISBywIjNqTTg8YAR54TOxTh8yT
 2y5PTJccB8GciqBsn3HgZGwvq3sA7XBzFaYetDwcpx7A1BbHFVi/BxHygeIOwcXiTbOE5VgRmH2u
 fBslNs02gbnby4HO4QAnTu/tvm2YySOHnSD+2G78qk8YZi997yc1GCCOji44zFve9NEsex7m+HBn
 +cwNvPgqSliGDmCQkYk9Ssr4u7eRCZblENGFFDCcwmjTvtQwqZl7yYs5ZZD5qu3YuFCUNYwglc7S
 Q3zZjPzjSL/GGuJhbQTMdHh6U8MxUg5LQARAQABiQElBBgBAgAPBQJX827nAhsMBQkFo5qAAAoJE
 AkoSxLC4iqiIPAH/RJXJOz000c5aOj9BIybl7/veVff1O/GDNqbTM90GpqLJnfCyEH8cn0Anqqn4
 JHMeZmHvhHX1dwa6tjm+tho6uh/eTi3VSbMiQvYAXjTb3fLbiZ6WXmUDSXLtgbwYJdWokVLfsQTV
 CYygVV8rDCS/HwV+uvFlotVdt8sVBWfanrTbtXD6W4y9sw/SmQaqAocnpe2TUnaO6Sutsm7QMi1S
 4efCof/5YqsBRjNBTV3NTRSrWSMfo5Tqa1TGBKMm1g5KKGDGwxpyPaNZC5G3flhoHeJfChwqhJp+
 GiGYvvb/hAdvSinBPvwsgXeODruOKutyTa7UF2ZadIlX+QnGHSmC50=
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
To: ludo@HIDDEN
From: Carlo Zancanaro <carlo@HIDDEN>
Message-ID: <BC9EC36A-3916-4DB8-B70F-785B692BC4A4@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 23170
Cc: 23170 <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 (-)

Hey Ludo=E2=80=99!


On 27 August 2018 7:08:34 am AEST, ludo@gnu=2Eorg wrote:
>I forgot if this was already done, but perhaps you can add a bit in the m=
anual to insist that =E2=80=98restart=E2=80=99 is not quite the same as =E2=
=80=98stop=E2=80=99 + =E2=80=98start=E2=80=99=2E

I hadn't done that, but I have now=2E There aren't many mentions of restar=
t in the manual, but I changed the one that seemed most relevant=2E

>Anyway, it all LGTM, thanks!

Pushed! Thanks for the review=2E

Carlo




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

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


Received: (at 23170) by debbugs.gnu.org; 26 Aug 2018 22:05:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 26 18:05:51 2018
Received: from localhost ([127.0.0.1]:33472 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fu3AN-0003FG-LY
	for submit <at> debbugs.gnu.org; Sun, 26 Aug 2018 18:05:51 -0400
Received: from zancanaro.com.au ([45.76.117.151]:39244)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlo@HIDDEN>) id 1fu3AL-0003F1-N3
 for 23170 <at> debbugs.gnu.org; Sun, 26 Aug 2018 18:05:50 -0400
Received: from [10.9.93.34] (unknown [120.17.232.46])
 by zancanaro.com.au (Postfix) with ESMTPSA id 6972D23827;
 Sun, 26 Aug 2018 22:05:47 +0000 (UTC)
Date: Mon, 27 Aug 2018 08:05:45 +1000
User-Agent: K-9 Mail for Android
In-Reply-To: <87ftz07s4t.fsf@HIDDEN>
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN> <87bm9qbjb4.fsf@HIDDEN>
 <871samqcz4.fsf@HIDDEN> <87ftz07s4t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="----0259SEDOVN1MCHUMT9WEGX9DJ2Q2TW"
Content-Transfer-Encoding: 7bit
Autocrypt: addr=carlo@HIDDEN; keydata=mQENBFfzbucBCADMZUa9GBphulUIP
 3V6Fwn2v26sAgh9RmSt5by6LAeEqmXehz9xxbnrsjQUumXeUssZ4p0JsHCJ1Iy9+lN7clwuGK6DG
 yy8sqPiCDLMnExTXCtL4rQouZCA3LzI9NW+yNk/2eNJU0vdvxFuuIezY8sdLAZQQX6YviHSjVkkb
 7+ZhDTFy2ZAqBiMDJ2Wz8iVWDn7ZPSB53vW9YBFgTBnWkzzCtbrknxGOq9FaFp2N4Pc8BDXaDLKU
 D9JGqUX2Dbqknl2dY8KiifPUbgP5jNiBhsTCUVtZoYxAsFrKd6sd3QDjoy6BL8qZ75nngjNBEwnm
 KK7VploOPkeQqPBSYbAsv61ABEBAAG0J0NhcmxvIFphbmNhbmFybyA8Y2FybG9AemFuY2FuYXJvL
 mlkLmF1PokBPgQTAQIAKAUCV/Nu5wIbAwUJBaOagAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AAC
 gkQCShLEsLiKqKxhgf+MNea6LR4Cj1eF68Hl0A6SUdaF+1wKY38LQjqjCt4355yCs2mSPTNquCAi
 AmVLoizdoy1wb1NhyT3NdqmOTxm9P7JskPxHXPg0uKkdwB1o3w6CghMOED1JACOBr+JOK5zawqoq
 /1+7GhsOx7KvHJpRlK7zk4QQeqE8hD7k5T6QgXR6pYAhl1jVqpANIgp+b0kzQn650pIIzWhMckiu
 TxRCaxqDXUzM17UugFRvp63ZSA8LEyoGeg4bjR8s+bQoTSYhNfVHYgZZgsG2OFphcQ9EXQ33Occl
 J+k3sabjOgAPEFZ1YHE0N0hpqTUSM36ZOLFJdn3ggZeT/ijdrMsp7XxWLkBDQRX827nAQgAqMoK+
 5/59bB2DIvCHuKW0KJ9PM1CinTJe8hX4/bJu0xJehNMU01OL7gISBywIjNqTTg8YAR54TOxTh8yT
 2y5PTJccB8GciqBsn3HgZGwvq3sA7XBzFaYetDwcpx7A1BbHFVi/BxHygeIOwcXiTbOE5VgRmH2u
 fBslNs02gbnby4HO4QAnTu/tvm2YySOHnSD+2G78qk8YZi997yc1GCCOji44zFve9NEsex7m+HBn
 +cwNvPgqSliGDmCQkYk9Ssr4u7eRCZblENGFFDCcwmjTvtQwqZl7yYs5ZZD5qu3YuFCUNYwglc7S
 Q3zZjPzjSL/GGuJhbQTMdHh6U8MxUg5LQARAQABiQElBBgBAgAPBQJX827nAhsMBQkFo5qAAAoJE
 AkoSxLC4iqiIPAH/RJXJOz000c5aOj9BIybl7/veVff1O/GDNqbTM90GpqLJnfCyEH8cn0Anqqn4
 JHMeZmHvhHX1dwa6tjm+tho6uh/eTi3VSbMiQvYAXjTb3fLbiZ6WXmUDSXLtgbwYJdWokVLfsQTV
 CYygVV8rDCS/HwV+uvFlotVdt8sVBWfanrTbtXD6W4y9sw/SmQaqAocnpe2TUnaO6Sutsm7QMi1S
 4efCof/5YqsBRjNBTV3NTRSrWSMfo5Tqa1TGBKMm1g5KKGDGwxpyPaNZC5G3flhoHeJfChwqhJp+
 GiGYvvb/hAdvSinBPvwsgXeODruOKutyTa7UF2ZadIlX+QnGHSmC50=
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
To: ludo@HIDDEN
From: Carlo Zancanaro <carlo@HIDDEN>
Message-ID: <7A4A9C8A-E937-44A9-B941-B8263B00093A@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 23170
Cc: 23170 <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 (-)

------0259SEDOVN1MCHUMT9WEGX9DJ2Q2TW
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hey Ludo=E2=80=99!


On 27 August 2018 7:08:34 am AEST, ludo@gnu=2Eorg wrote:
>I forgot if this was already done, but perhaps you can add a bit in the m=
anual to insist that =E2=80=98restart=E2=80=99 is not quite the same as =E2=
=80=98stop=E2=80=99 + =E2=80=98start=E2=80=99=2E

I hadn't done that, but I have now=2E There aren't many mentions of restar=
t in the manual, but I changed the one that seemed most relevant=2E

>Anyway, it all LGTM, thanks!

Pushed! Thanks for the review=2E

Carlo

------0259SEDOVN1MCHUMT9WEGX9DJ2Q2TW
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hey Ludo=E2=80=99!<br>
<br>
<br>
On 27 August 2018 7:08:34 am AEST, ludo@gnu=2Eorg wrote:<br>
&gt;I forgot if this was already done, but perhaps you can add a bit in th=
e manual to insist that =E2=80=98restart=E2=80=99 is not quite the same as =
=E2=80=98stop=E2=80=99 + =E2=80=98start=E2=80=99=2E<br>
<br>
I hadn&#39;t done that, but I have now=2E There aren&#39;t many mentions o=
f restart in the manual, but I changed the one that seemed most relevant=2E=
<br>
<br>
&gt;Anyway, it all LGTM, thanks!<br>
<br>
Pushed! Thanks for the review=2E<br>
<br>
Carlo<br>

------0259SEDOVN1MCHUMT9WEGX9DJ2Q2TW--




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

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


Received: (at 23170) by debbugs.gnu.org; 26 Aug 2018 21:08:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 26 17:08:47 2018
Received: from localhost ([127.0.0.1]:33461 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fu2H9-0001u8-01
	for submit <at> debbugs.gnu.org; Sun, 26 Aug 2018 17:08:47 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1fu2H4-0001tp-SO
 for 23170 <at> debbugs.gnu.org; Sun, 26 Aug 2018 17:08:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1fu2Gy-00007Z-LG
 for 23170 <at> debbugs.gnu.org; Sun, 26 Aug 2018 17:08:37 -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]:51728)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1fu2Gy-00007H-G6; Sun, 26 Aug 2018 17:08:36 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=50014 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1fu2Gy-0002ql-8L; Sun, 26 Aug 2018 17:08:36 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Carlo Zancanaro <carlo@HIDDEN>
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN> <87bm9qbjb4.fsf@HIDDEN>
 <871samqcz4.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 9 Fructidor an 226 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: Sun, 26 Aug 2018 23:08:34 +0200
In-Reply-To: <871samqcz4.fsf@HIDDEN> (Carlo Zancanaro's message of
 "Sun, 26 Aug 2018 08:48:47 +1000")
Message-ID: <87ftz07s4t.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: 23170
Cc: 23170 <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 (------)

Carlo Zancanaro <carlo@HIDDEN> skribis:

> On Sun, Aug 26 2018, Ludovic Court=C3=A8s wrote:
>> I wonder if there are cases where one might want to restart a
>> service without restarting its dependent services.  We can probably
>> ignore it for now, but perhaps we=E2=80=99ll need to add a flag or a
>> separate action later.
>>
>> Thoughts?
>
> I think this is best served by 'herd stop', followed by 'herd
> start'. This patch just special-cases the 'restart' action, so
> manually stopping then starting a service will behave as the old
> restart used to.

Great, I had overlooked this.

>> For clarity, should we do an explicit =E2=80=9Cherd stop test1=E2=80=9D =
followed by
>> =E2=80=9Cherd start test1=E2=80=9D?  I know it=E2=80=99s currently equiv=
alent under the
>> hood, but it might be slightly clearer.  WDYT?
>
> Hopefully the above also answers this, too.

It does, thanks!

> I did consider whether it was worth adding a test for 'herd stop' to
> make sure it still stops dependent services, and 'herd start' to make
> sure it doesn't start dependent services, but in the end I decided not
> to. I'm happy to send through another patch to test these cases,
> though, if you think it would be worthwhile.

No, that=E2=80=99s fine.

I forgot if this was already done, but perhaps you can add a bit in the
manual to insist that =E2=80=98restart=E2=80=99 is not quite the same as =
=E2=80=98stop=E2=80=99 +
=E2=80=98start=E2=80=99.

Anyway, it all LGTM, thanks!

Ludo=E2=80=99.




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

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


Received: (at 23170) by debbugs.gnu.org; 25 Aug 2018 22:49:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 25 18:49:04 2018
Received: from localhost ([127.0.0.1]:60819 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1fthMe-0006pE-2A
	for submit <at> debbugs.gnu.org; Sat, 25 Aug 2018 18:49:04 -0400
Received: from mail-pl1-f173.google.com ([209.85.214.173]:41983)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlozancanaro@HIDDEN>) id 1fthMb-0006oj-Nc
 for 23170 <at> debbugs.gnu.org; Sat, 25 Aug 2018 18:49:02 -0400
Received: by mail-pl1-f173.google.com with SMTP id p4-v6so2534855pll.8
 for <23170 <at> debbugs.gnu.org>; Sat, 25 Aug 2018 15:49:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:references:user-agent:from:to:cc:subject:in-reply-to:date
 :message-id:mime-version;
 bh=Q+vZeOQg/5rAtdMm//0hG6yCuXouyBWV3a9GCRVr2zU=;
 b=XeK9piB/KimFWtqv3ki/Wv0F9xX/TxOHX22IOLrrJExSNmGVxxQuuXVlKUKY1Ul/4Z
 dfnCVLclOQCZUI9uoRrMblh14ABU6hOmmEZexLVvD5mMQCqYsVgCM9tk7PLUOxuEJNks
 kHdRvUc71NtvofsB17XcmTnygGj7a6PnwPKX3vKT/PocdrEzDZVAitehhx3WYmT6UWzx
 mdWLHF4OZn1LW4n4dWSr4FMP3O0T4cFO17GF2AcihXqpe9YM6/I91P53dZafbRytygfo
 ok1SyDVBqeRkchiSCIG9NTumtwHWR7j9KijPaXtVKAJb6EsxjuiPZdg8eJnHwVO07Z1m
 MIaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject
 :in-reply-to:date:message-id:mime-version;
 bh=Q+vZeOQg/5rAtdMm//0hG6yCuXouyBWV3a9GCRVr2zU=;
 b=Wv1zLLLyT2PQK8MVGB38csRTUyJ3wakmdMauZ0dsELMlSm2JTL3iYLnaJikjBNQ8fl
 rZgR9bAVccXAsqOHWWGKmOcjfOaXJFTvtiMdH1uUTgYuGEgVPpvxZR9dulLB5k5Vkv6s
 oX5rhXiIi5YkTuKXXLph1edLL4UVpRMT7VGuSfNjK3AVRZLYOdVDGIvCL4tagRZJO9lE
 NZ+1RhFaN0IvRBssQdTf8ZFsOdsx3SEcAdqI/4B9sTjc/asBjokzQ92dn3aUICES3c12
 Gc1ggqBOumml2uqf92lyD5PtPUFNjaMb0BYfQ6x+YPKIdiPIfl1WnfIjiprOHffMj+hv
 e5cQ==
X-Gm-Message-State: APzg51AMA0Xmtt2OehYhSeuTSHI1Ll8J3SQVGrUy0cd+hvHxWHFHmT79
 44jcr+sp0K9zFoznm2GcmdakIscX
X-Google-Smtp-Source: ANB0VdbM4UHg1k3g8CmFxML5fuHSdBBP7Maxshiv62WR3reu5362a7MHd2xB8W3JTNcfeuKIVn7Fpg==
X-Received: by 2002:a17:902:8604:: with SMTP id
 f4-v6mr6929299plo.225.1535237335392; 
 Sat, 25 Aug 2018 15:48:55 -0700 (PDT)
Received: from pidgey (210-1-202-160-cpe.spintel.net.au. [210.1.202.160])
 by smtp.gmail.com with ESMTPSA id f75-v6sm20750616pfk.85.2018.08.25.15.48.51
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 25 Aug 2018 15:48:53 -0700 (PDT)
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN> <87bm9qbjb4.fsf@HIDDEN>
User-agent: mu4e 1.0; emacs 26.1
From: Carlo Zancanaro <carlo@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
In-reply-to: <87bm9qbjb4.fsf@HIDDEN>
Date: Sun, 26 Aug 2018 08:48:47 +1000
Message-ID: <871samqcz4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 23170
Cc: 23170 <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.8 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

On Sun, Aug 26 2018, Ludovic Court=C3=A8s wrote:
> I wonder if there are cases where one might want to restart a=20
> service without restarting its dependent services.  We can=20
> probably ignore it for now, but perhaps we=E2=80=99ll need to add a flag=
=20
> or a separate action later.
>
> Thoughts?

I think this is best served by 'herd stop', followed by 'herd=20
start'. This patch just special-cases the 'restart' action, so=20
manually stopping then starting a service will behave as the old=20
restart used to.

> For clarity, should we do an explicit =E2=80=9Cherd stop test1=E2=80=9D f=
ollowed=20
> by =E2=80=9Cherd start test1=E2=80=9D?  I know it=E2=80=99s currently equ=
ivalent under=20
> the hood, but it might be slightly clearer.  WDYT?

Hopefully the above also answers this, too. I did consider whether=20
it was worth adding a test for 'herd stop' to make sure it still=20
stops dependent services, and 'herd start' to make sure it doesn't=20
start dependent services, but in the end I decided not to. I'm=20
happy to send through another patch to test these cases, though,=20
if you think it would be worthwhile.

Carlo

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1lpncq7JnOkt+LaeqdyPv9awIbwFAluB3M8ACgkQqdyPv9aw
IbzlkRAAuuV6Uvb+pDrPisIMqTsunJKVOkurgKSSw7mMe2QCurxTGENCkohtniNu
LSXR7M8J3TsmJgUxC3go4vc2koKDzBQj00mnFveRXI3LG4ZO3dPVLwtEt8OjxzRW
oRBMqb1jSn1qdsW/sEo5qZ7cJcSmJb1lChvzQEg3IOgRmm+7VWNZbfWCp9BmThFp
nBzTwZ7O/9wekWZuxaQ8xuWg3kFVf9CK2HsNs5gT2/QLqp9xC2mhlh6rx7pRmsBl
xT8qK5rF1V/FgVcdAufwNN7bx58pURpv11VTTySQNXytszoXUp/khOg7UJpLKnHA
bkkySPlnvIP3OHQlUuuR3TKpF3gs8AobJFqJmEPDGwcxDtIoZza4AOc7I2mfMo5a
jKXaBLsmSY79Eou0ySF3LU/wTyJmg2tcv8khTGIcLMeOGEW7wm6mI0v0iReW6VVo
UA5Ah8NI46WsXF1kT/lGnglrHTkmaiUqyhFkihxxiBlud6Q4Hq+ZZVKUBQvRbpZh
0p7MOPBlxRWDJ50oDxCwuxF7SZKMbfVzTsj1fH9nM1RSMWohOXVchQ7tlU2Nayhh
U1cqhbnEcwozAiSX0cdVPvO71SZ4i2mGoKuzDFmXVhZhDt2thypzuu2m6qckRBtK
JpDyXIaOGZaRf3VGyIT8pGGsvA8oB8LwF8ofnTHmAKXUW7tOh5E=
=jJMT
-----END PGP SIGNATURE-----
--=-=-=--




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

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


Received: (at 23170) by debbugs.gnu.org; 25 Aug 2018 14:41:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 25 10:41:13 2018
Received: from localhost ([127.0.0.1]:60712 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ftZkX-0003jr-B0
	for submit <at> debbugs.gnu.org; Sat, 25 Aug 2018 10:41:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1ftZkV-0003jC-If
 for 23170 <at> debbugs.gnu.org; Sat, 25 Aug 2018 10:41:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1ftZkP-0007pq-CL
 for 23170 <at> debbugs.gnu.org; Sat, 25 Aug 2018 10:41:06 -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]:47590)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1ftZkP-0007pa-7h; Sat, 25 Aug 2018 10:41:05 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=44016 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1ftZkO-0004ZD-JN; Sat, 25 Aug 2018 10:41:05 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Carlo Zancanaro <carlo@HIDDEN>
Subject: Re: bug#23170: [PATCH shepherd] Restart dependent services on service
 restart
References: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
 <874lfi65rv.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 8 Fructidor an 226 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, 25 Aug 2018 16:41:03 +0200
In-Reply-To: <874lfi65rv.fsf@HIDDEN> (Carlo Zancanaro's message of
 "Sat, 25 Aug 2018 21:33:47 +1000")
Message-ID: <87bm9qbjb4.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: 23170
Cc: 23170 <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 (------)

Hi again!  :-)

Carlo Zancanaro <carlo@HIDDEN> skribis:

> I've written a patch to fix this. It's not super smart, but it should
> do the job.

I wonder if there are cases where one might want to restart a service
without restarting its dependent services.  We can probably ignore it
for now, but perhaps we=E2=80=99ll need to add a flag or a separate action =
later.

Thoughts?

> From 50dd3ef4888b04ea3b869da893b23ad69fad8971 Mon Sep 17 00:00:00 2001
> From: Carlo Zancanaro <carlo@HIDDEN>
> Date: Sat, 25 Aug 2018 20:32:11 +1000
> Subject: [PATCH] service: Restart dependent services on service restart
>
> * modules/shepherd/service.scm (required-by?): New procedure.
> (stop): Return a list of canonical-names for stopped dependent services,
> including transitive dependencies.
> (action)[restart]: Start services based on the return value of stop.
> (fold-services): New procedure.
> * tests/restart.sh: New file.
> * Makefile.am (TESTS): Add tests/restart.sh.

[...]

> +# Restart test1 and make sure that both services are still running (ie. =
that
> +# test2 hasn't been stopped)
> +$herd restart test1
> +$herd status test1 | grep started
> +$herd status test2 | grep started
> +
> +# Now let's test with a transitive dependency
> +$herd start test3
> +$herd status test3 | grep started
> +
> +# After restarting test1 we want test3 to still be running
> +$herd restart test1
> +$herd status test1 | grep started
> +$herd status test2 | grep started
> +$herd status test3 | grep started

For clarity, should we do an explicit =E2=80=9Cherd stop test1=E2=80=9D fol=
lowed by
=E2=80=9Cherd start test1=E2=80=9D?  I know it=E2=80=99s currently equivale=
nt under the hood,
but it might be slightly clearer.  WDYT?

Otherwise it LGTM.  Thanks for addressing these longstanding issues!

Ludo=E2=80=99.




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

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


Received: (at 23170) by debbugs.gnu.org; 25 Aug 2018 11:34:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 25 07:34:14 2018
Received: from localhost ([127.0.0.1]:60238 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ftWpQ-0007TE-Pw
	for submit <at> debbugs.gnu.org; Sat, 25 Aug 2018 07:34:14 -0400
Received: from mail-pg1-f173.google.com ([209.85.215.173]:40524)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlozancanaro@HIDDEN>) id 1ftWpP-0007Sj-LG
 for 23170 <at> debbugs.gnu.org; Sat, 25 Aug 2018 07:34:04 -0400
Received: by mail-pg1-f173.google.com with SMTP id z25-v6so5420250pgu.7
 for <23170 <at> debbugs.gnu.org>; Sat, 25 Aug 2018 04:34:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:user-agent:from:to:subject:message-id:date:mime-version;
 bh=HAVQLElOXbSvPrucD4hccIwTi6Jr2CuwPcAFVPGXBNQ=;
 b=lamkK8M0kuT1qI4rO76J94iccj7FAdk//LeYU+pWrx6ZNbBI8zTr1DzhECh4swlE5k
 5z3dSNXItGj+xlcOCvGyISyKgr2ou3n96cFk8O7mTcy3Dmsal/hT1nKQbD020aCDigmT
 9NsFYWsSLVxrCsh2hW1pKHFTVA+rRDWCd3u5nyFa+IWMFvA10uKlFMQvdbAQBnnIuBxw
 FMne8kDPrzUmxf8+P7bZ+dxhRcizvRv6Spa41YdUe4ciE8zfHKsEQbIv24v8O5FTbs7D
 oaejpN7rQQTKM9gq95ag4J7gQMS52xRSBakETqw+DkePXvVGnX3lA6SdXYFWIpPkLI/c
 xuUA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:user-agent:from:to:subject:message-id
 :date:mime-version;
 bh=HAVQLElOXbSvPrucD4hccIwTi6Jr2CuwPcAFVPGXBNQ=;
 b=ShlS4dOTdG/11z9ET731W47mjhmDTXbJHeeYG6x6ilLCXbSDXS8c1EKAVFYomi5fs/
 1xfOTabC2tOWL+pHWZkqXLR/Zt30qFSIBcRjqf466azNdBpSZtlXgHyxFlSLOkkqUH4o
 mTgWbLWvL/C6F7uQgyNgxHcWHxL5JpVCe3tLD13W8CkhVH8y4SCM1Yp+7DN8d7y+M48h
 1/UBiScq3/h7jC+lA3ZWyDqAku5bbmDZ4OUPVbFld0aqzff+XSbeR/+679VQSrIeD1lR
 8l+PQ3HRlAa8NyDKZJd7gc1LB5zfrWQwfl8sPhRT/VQ9AUqBB9dstnD1v9xaNyJCXasW
 BBDg==
X-Gm-Message-State: APzg51DbIVOkxUBsv6QhYLquP3CrJb1BfpPTPjjDuaB//JQl/km3xRwU
 SSFrh27ZKPcRWuwZMUSSBn9B4p2b
X-Google-Smtp-Source: ANB0VdaqEVHvusUhGHpfyz5rY1OIZ58skaRHDw3YCqsZJbOT4K/14CQ7CX7pBbcU++8jUij0mJw1NA==
X-Received: by 2002:a63:6106:: with SMTP id
 v6-v6mr5538683pgb.100.1535196837346; 
 Sat, 25 Aug 2018 04:33:57 -0700 (PDT)
Received: from pidgey (210-1-202-160-cpe.spintel.net.au. [210.1.202.160])
 by smtp.gmail.com with ESMTPSA id y85-v6sm15073488pfa.170.2018.08.25.04.33.54
 for <23170 <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 25 Aug 2018 04:33:56 -0700 (PDT)
User-agent: mu4e 1.0; emacs 26.1
From: Carlo Zancanaro <carlo@HIDDEN>
To: 23170 <at> debbugs.gnu.org
Subject: [PATCH shepherd] Restart dependent services on service restart
Message-ID: <874lfi65rv.fsf@HIDDEN>
Date: Sat, 25 Aug 2018 21:33:47 +1000
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 23170
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 (/)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain; format=flowed

I've written a patch to fix this. It's not super smart, but it 
should do the job.

It currently targets the branch after my patch in #32408[1], but 
it's technically an independent change.

[1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32408


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline;
 filename=0001-service-Restart-dependent-services-on-service-restar.patch
Content-Transfer-Encoding: quoted-printable

From=2050dd3ef4888b04ea3b869da893b23ad69fad8971 Mon Sep 17 00:00:00 2001
From: Carlo Zancanaro <carlo@HIDDEN>
Date: Sat, 25 Aug 2018 20:32:11 +1000
Subject: [PATCH] service: Restart dependent services on service restart

* modules/shepherd/service.scm (required-by?): New procedure.
(stop): Return a list of canonical-names for stopped dependent services,
including transitive dependencies.
(action)[restart]: Start services based on the return value of stop.
(fold-services): New procedure.
* tests/restart.sh: New file.
* Makefile.am (TESTS): Add tests/restart.sh.
=2D--
 Makefile.am                  |  1 +
 modules/shepherd/service.scm | 90 ++++++++++++++++++++++--------------
 tests/restart.sh             | 77 ++++++++++++++++++++++++++++++
 3 files changed, 133 insertions(+), 35 deletions(-)
 create mode 100644 tests/restart.sh

diff --git a/Makefile.am b/Makefile.am
index 4322d7f..d9e21e9 100644
=2D-- a/Makefile.am
+++ b/Makefile.am
@@ -187,6 +187,7 @@ TESTS =3D						\
   tests/replacement.sh				\
   tests/respawn.sh				\
   tests/respawn-throttling.sh			\
+  tests/restart.sh				\
   tests/misbehaved-client.sh			\
   tests/no-home.sh				\
   tests/pid-file.sh				\
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 006309c..510a5ea 100644
=2D-- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -358,61 +358,72 @@ NEW-SERVICE."
     (for-each remove-service (provided-by old-service))
     (register-services new-service)))
=20
+(define (required-by? service dependent)
+  "Returns #t if DEPENDENT directly requires SERVICE in order to run.  Ret=
urns
+#f otherwise."
+  (and (find (lambda (dependency)
+               (memq dependency (provided-by service)))
+             (required-by dependent))
+       #t))
+
 ;; Stop the service, including services that depend on it.  If the
 ;; latter fails, continue anyway.  Return `#f' if it could be stopped.
=2D(define-method (stop (obj <service>) . args)
+(define-method (stop (service <service>) . args)
+  "Stop SERVICE, and any services which depend on it.  Returns a list of
+canonical names for all of the services which have been stopped (including
+transitive dependent services).  This method will print a warning if SERVI=
CE
+is not already running, and will return SERVICE's canonical name in a list=
."
   ;; Block asyncs so the SIGCHLD handler doesn't execute concurrently.
=2D  ;; Notably, that makes sure the handler processes the SIGCHLD for OBJ's
=2D  ;; process once we're done; otherwise, it could end up respawning OBJ.
+  ;; Notably, that makes sure the handler processes the SIGCHLD for SERVIC=
E's
+  ;; process once we're done; otherwise, it could end up respawning SERVIC=
E.
   (call-with-blocked-asyncs
    (lambda ()
=2D     (if (not (running? obj))
=2D         (local-output "Service ~a is not running." (canonical-name obj))
=2D         (if (slot-ref obj 'stop-delay?)
+     (if (not (running? service))
+         (begin
+           (local-output "Service ~a is not running." (canonical-name serv=
ice))
+           (list (canonical-name service)))
+         (if (slot-ref service 'stop-delay?)
              (begin
=2D               (slot-set! obj 'waiting-for-termination? #t)
+               (slot-set! service 'waiting-for-termination? #t)
                (local-output "Service ~a pending to be stopped."
=2D                             (canonical-name obj)))
=2D             (begin
=2D               ;; Stop services that depend on it.
=2D               (for-each-service
=2D                (lambda (serv)
=2D                  (and (running? serv)
=2D                       (for-each (lambda (sym)
=2D                                   (and (memq sym (provided-by obj))
=2D                                        (stop serv)))
=2D                                 (required-by serv)))))
=2D
+                             (canonical-name service))
+               (list (canonical-name service)))
+             (let ((name (canonical-name service))
+                   (stopped-dependents (fold-services (lambda (other acc)
+                                                        (if (and (running?=
 other)
+                                                                 (required=
-by? service other))
+                                                            (append (stop =
other) acc)
+                                                            acc))
+                                                      '())))
                ;; Stop the service itself.
                (catch #t
                  (lambda ()
=2D                   (apply (slot-ref obj 'stop)
=2D                          (slot-ref obj 'running)
+                   (apply (slot-ref service 'stop)
+                          (slot-ref service 'running)
                           args))
                  (lambda (key . args)
                    ;; Special case: 'root' may quit.
=2D                   (and (eq? root-service obj)
+                   (and (eq? root-service service)
                         (eq? key 'quit)
                         (apply quit args))
                    (caught-error key args)))
=20
=2D               ;; OBJ is no longer running.
=2D               (slot-set! obj 'running #f)
+               ;; SERVICE is no longer running.
+               (slot-set! service 'running #f)
=20
                ;; Reset the list of respawns.
=2D               (slot-set! obj 'last-respawns '())
+               (slot-set! service 'last-respawns '())
=20
                ;; Replace the service with its replacement, if it has one
=2D               (let ((replacement (slot-ref obj 'replacement)))
+               (let ((replacement (slot-ref service 'replacement)))
                  (when replacement
=2D                   (replace-service obj replacement)))
+                   (replace-service service replacement)))
=20
                ;; Status message.
=2D               (let ((name (canonical-name obj)))
=2D                 (if (running? obj)
=2D                     (local-output "Service ~a could not be stopped." na=
me)
=2D                     (local-output "Service ~a has been stopped." name))=
))))
=2D     (slot-ref obj 'running))))
+               (if (running? service)
+                   (local-output "Service ~a could not be stopped." name)
+                   (local-output "Service ~a has been stopped." name))
+               (cons name stopped-dependents)))))))
=20
 ;; Call action THE-ACTION with ARGS.
 (define-method (action (obj <service>) the-action . args)
@@ -423,10 +434,9 @@ NEW-SERVICE."
       ;; Restarting is done in the obvious way.
       ((restart)
        (lambda (running . args)
=2D         (if running
=2D             (stop obj)
=2D             (local-output "~a was not running." (canonical-name obj)))
=2D         (apply start obj args)))
+         (let ((stopped-services (stop obj)))
+           (for-each start stopped-services)
+           #t)))
       ((status)
        ;; Return the service itself.  It is automatically converted to an =
sexp
        ;; via 'result->sexp' and sent to the client.
@@ -953,6 +963,16 @@ Return #f if service is not found."
           (eq? name (canonical-name service)))
         services))
=20
+(define (fold-services proc init)
+  "Apply PROC to the registered services to build a result, and return that
+result.  Works in a manner akin to `fold' from SRFI-1."
+  (hash-fold (lambda (name services acc)
+               (let ((service (lookup-canonical-service name services)))
+                 (if service
+                     (proc service acc)
+                     acc)))
+             init %services))
+
 (define (for-each-service proc)
   "Call PROC for each registered service."
   (hash-for-each (lambda (name services)
diff --git a/tests/restart.sh b/tests/restart.sh
new file mode 100644
index 0000000..92a1f79
=2D-- /dev/null
+++ b/tests/restart.sh
@@ -0,0 +1,77 @@
+# GNU Shepherd --- Test restarting services.
+# Copyright =C2=A9 2013, 2014, 2016 Ludovic Court=C3=A8s <ludo@HIDDEN>
+# Copyright =C2=A9 2018 Carlo Zancanaro <carlo@HIDDEN>
+#
+# This file is part of the GNU Shepherd.
+#
+# The GNU Shepherd is free software; you can redistribute it and/or modify=
 it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# The GNU Shepherd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with the GNU Shepherd.  If not, see <http://www.gnu.org/licenses/>.
+
+shepherd --version
+herd --version
+
+socket=3D"t-socket-$$"
+conf=3D"t-conf-$$"
+log=3D"t-log-$$"
+pid=3D"t-pid-$$"
+
+herd=3D"herd -s $socket"
+
+trap "cat $log || true ;
+  rm -f $socket $conf $log;
+  test -f $pid && kill \`cat $pid\` || true ; rm -f $pid" EXIT
+
+cat > "$conf"<<EOF
+(register-services
+ (make <service>
+   #:provides '(test1)
+   #:start (const #t)
+   #:stop  (const #t))
+ (make <service>
+   #:provides '(test2)
+   #:requires '(test1)
+   #:start (const #t)
+   #:stop  (const #t))
+ (make <service>
+   #:provides '(test3)
+   #:requires '(test2)
+   #:start (const #t)
+   #:stop  (const #t)))
+EOF
+
+rm -f "$pid"
+shepherd -I -s "$socket" -c "$conf" -l "$log" --pid=3D"$pid" &
+
+while ! test -f "$pid" ; do sleep 0.3 ; done
+
+# Start some test services, and make sure they behave how we expect
+$herd start test1
+$herd start test2
+$herd status test1 | grep started
+$herd status test2 | grep started
+
+# Restart test1 and make sure that both services are still running (ie. th=
at
+# test2 hasn't been stopped)
+$herd restart test1
+$herd status test1 | grep started
+$herd status test2 | grep started
+
+# Now let's test with a transitive dependency
+$herd start test3
+$herd status test3 | grep started
+
+# After restarting test1 we want test3 to still be running
+$herd restart test1
+$herd status test1 | grep started
+$herd status test2 | grep started
+$herd status test3 | grep started
=2D-=20
2.18.0


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE1lpncq7JnOkt+LaeqdyPv9awIbwFAluBPpsACgkQqdyPv9aw
IbyeQw/7B/16oHu0N3vvfGPx1TJWfByvfjnU9jlo8p0psZqR8/fbGpqax2+/VdEP
zoL4XSUZMYTAeSOqFsFshHl9oyTnMInHN3+XyDCKRg8UiOj8FjQkb74ppxGdjTbj
mosb2gMl5I5cIRauH3aAq64DTeZx9PZRzN0OXXAGK0B8RrKUVu8Z0AC9q9kMZ4V+
Jp5d0hOG20WwV66thte/ctzhC7xF2/WgRzG/fwxnF2B3UEL2VdKanBwNq8rLBcvV
y4tW1OCWUCrdIZZWHxf6EoXckjiEgQBgUkmCOmqvur+AkD/eGtFzwMkrP0juJoMz
NiMuOwhj+SYLrhgaHcnwWRnOxiap/jzY6MDoxhbw0WFtitCHhm5Mz9oFJdw6vJht
fsrmcC2X4MfzLxRW4GwC3UqbGVKDC9SllFGRJVjwEQh0emShLXYGv88fVDGF3zXX
nmuQe1RHJYruNVjbzqWA+3KyBSHBPild/47dLmiFc6e+1VMYBpTUKdExOMXikEAp
3uZSATATO0Ziqcw+jzROo3IHwqhz0QsBYYjFWgV/cDdeHJn0r7BAkqWIi2j7cNSQ
Y2rQB41ZV7XlFMFg2RwSwXr/8hpMnrXsl0JlYKCaSwA+CMDSGBkDrYPU400Gn7c5
J1ghS+XPWYs/dVO4ssK9zpy4hl/c9dINjd3a/d6yBMFb9xspSD4=
=z5ll
-----END PGP SIGNATURE-----
--==-=-=--




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

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


Received: (at submit) by debbugs.gnu.org; 31 Mar 2016 13:23:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 31 09:23:43 2016
Received: from localhost ([127.0.0.1]:45913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1alcZb-0008EL-6Q
	for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:23:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42968)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dthompson2@HIDDEN>) id 1alcZZ-0008E9-KY
 for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:23:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1alcZO-0004KQ-SC
 for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:23:36 -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,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:59068)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1alcZO-0004KC-PX
 for submit <at> debbugs.gnu.org; Thu, 31 Mar 2016 09:23:30 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33877)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1alcZL-0004vv-0q
 for bug-guix@HIDDEN; Thu, 31 Mar 2016 09:23:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1alcZK-0004HZ-1e
 for bug-guix@HIDDEN; Thu, 31 Mar 2016 09:23:26 -0400
Received: from mail-yw0-x22a.google.com ([2607:f8b0:4002:c05::22a]:34868)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dthompson2@HIDDEN>) id 1alcZJ-0004HO-Pz
 for bug-guix@HIDDEN; Thu, 31 Mar 2016 09:23:25 -0400
Received: by mail-yw0-x22a.google.com with SMTP id g127so96841504ywf.2
 for <bug-guix@HIDDEN>; Thu, 31 Mar 2016 06:23:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=worcester-edu.20150623.gappssmtp.com; s=20150623;
 h=mime-version:date:message-id:subject:from:to;
 bh=eP3AP8we4xYP/cIPe393TLEs2Z0pKoexti/yoIRNDF8=;
 b=aop6Q9Lx6YS9LYHgKX6aCUaUBEt1Y7Qt3hYAnpWgIGZ/Y7QYWLbfY60zUQHQcz6YER
 dqyXJr36L3PdtqJLMI9N8nVh8GJ0WMbqQ7G7v0rlH/4YbyV/kcGbEqBRK4CcR/XSUuf6
 VNP7zOv3vQ+Nw7kZmI7J4pSkvwgm7vzwZ8I6kjMGTzex/DoZT3ouZ0wCUHmAsFdsXwQm
 rna7FQWvi/ELfcZo2esYBhBxLqpsb6wqndlFVocnSL/Qcgig1lBxXEkgl/vkEjRT+cGg
 1vSPvisasp0ygjEAr7FX4BoWVkHO7r0A9i3VPW0qE8Xi4rqnZ+Lbe7lzpxe/3kO0Wd3d
 wKpw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:date:message-id:subject:from:to;
 bh=eP3AP8we4xYP/cIPe393TLEs2Z0pKoexti/yoIRNDF8=;
 b=BRINOEPqKNe97/oLrPx+NCkH4Wztl5XWae3sna4cpEGMaPLzreq78aiX4l0pc0JS2+
 zRUcSELkjpqnvdCc0zdXqsh1Yi6w6ayQve9yhO4hZLOCg7Jy98S3vC9fnBp5ilObl+Oi
 Ic9sv18tft/McWNQPYR3RI//XmRMUqIvdZAmfQ03IqHxWKOm/JFSyWk3wIzq9xS86cx8
 RYDTVMbef6Ke+ux6/poFRDBlEDqHx0H9KclM8PtwmxblebaJbmUolqyF7i8pW5NEB++V
 mDh7gR3EV2WU/f2cazFkvc+mLvf8PxWkEiuOjFpXSdaZ3hWU9Tm12kWqA9MUPY6SyFGt
 X83w==
X-Gm-Message-State: AD7BkJJreOLegFrtCh715hQ+0CBqUG9lzvvFENeUHzYQWRRXr9a6GyEI0IQecIHun1CwHh0vM6M8IYvEdR/Vhg==
MIME-Version: 1.0
X-Received: by 10.37.231.202 with SMTP id e193mr7300745ybh.133.1459430604961; 
 Thu, 31 Mar 2016 06:23:24 -0700 (PDT)
Received: by 10.37.207.88 with HTTP; Thu, 31 Mar 2016 06:23:24 -0700 (PDT)
Date: Thu, 31 Mar 2016 09:23:24 -0400
Message-ID: <CAJ=RwfZdqc6iqsRsay95oPZDd-hrqkaERYA5PYiXp_FwOO1-Qg@HIDDEN>
Subject: Shepherd doesn't restart previously running dependent services
From: "Thompson, David" <dthompson2@HIDDEN>
To: bug-guix@HIDDEN
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
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.0 (----)
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.0 (----)

If service 'foo' is depended on by service 'bar', and both are
running, and one runs 'herd restart foo', both 'foo' and 'bar' are
stopped, but then only 'foo' is restarted.  I think that the dependent
services that were stopped should also be restarted, otherwise the
user has to manually start them back up one at a time.

- Dave




Acknowledgement sent to "Thompson, David" <dthompson2@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#23170; Package guix. 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: Sat, 5 Jan 2019 14:00:02 UTC

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