From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Zancanaro Subject: bug#23170: [PATCH shepherd] Restart dependent services on service restart Date: Sun, 26 Aug 2018 08:48:47 +1000 Message-ID: <871samqcz4.fsf@zancanaro.id.au> References: <874lfi65rv.fsf@zancanaro.id.au> <87bm9qbjb4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fthNe-0003aC-8a for bug-guix@gnu.org; Sat, 25 Aug 2018 18:50:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fthNb-00084G-3Y for bug-guix@gnu.org; Sat, 25 Aug 2018 18:50:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55801) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fthNa-00083w-Vt for bug-guix@gnu.org; Sat, 25 Aug 2018 18:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fthNa-0006qh-NU for bug-guix@gnu.org; Sat, 25 Aug 2018 18:50:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87bm9qbjb4.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 23170@debbugs.gnu.org --=-=-= 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----- --=-=-=--