From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22039: [PATCH] 'guix system reconfigure' must start/restart/stop services Date: Thu, 20 Sep 2018 13:08:34 +0200 Message-ID: <87efdov32l.fsf@gnu.org> References: <874mg6rsjl.fsf@gnu.org> <87tvnhxr20.fsf@zancanaro.id.au> <87sh2tijb2.fsf@gnu.org> <87va7pza4p.fsf@zancanaro.id.au> <87tvn9b0qh.fsf@gnu.org> <87tvn8d0n7.fsf@zancanaro.id.au> <87lg7xh4l0.fsf@gnu.org> <871s9pfbpg.fsf@zancanaro.id.au> <87efdowleu.fsf@gnu.org> <87tvmkqxe7.fsf@zancanaro.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2wpV-0001FQ-K4 for bug-guix@gnu.org; Thu, 20 Sep 2018 07:09:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2wpS-0004AG-5f for bug-guix@gnu.org; Thu, 20 Sep 2018 07:09:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42115) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2wpR-0004A4-W7 for bug-guix@gnu.org; Thu, 20 Sep 2018 07:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2wpR-0006qk-Pi for bug-guix@gnu.org; Thu, 20 Sep 2018 07:09:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87tvmkqxe7.fsf@zancanaro.id.au> (Carlo Zancanaro's message of "Thu, 20 Sep 2018 20:24:48 +1000") 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: Carlo Zancanaro Cc: 22039@debbugs.gnu.org Carlo Zancanaro skribis: > We still need to work out what we want to do on the Guix side once the > Shepherd is released. Do we want to restart services that we can, or > print a message telling users how to do so? Maybe individual services > should be able to specify their preference? I would reload and restart services currently stopped (what =E2=80=98guix s= ystem reconfigure=E2=80=99 currently does), and replace all the other services. = This is what the patch you sent at does. AIUI the only remaining issue is whether/how to print hints about services that need to be manually restarted. In I wrote: > Perhaps we should simply print (1) the list of services that were > restarted, and (2) a message saying that users should explicitly run > =E2=80=9Cherd restart SERVICE=E2=80=9D to upgrade other services. To which you replied: > If there are services that must never be restarted, then maybe we=20 > don't want to indiscriminately print out a message to restart=20 > everything. We need some way to mark services that must not be=20 > restarted. If that's the case, then we might as well just=20 > automatically restart the services that we can rather than=20 > printing a message saying to do so. What do we gain by adding an=20 > extra step to that process? >From the POV of the Shepherd, services carry no semantics. The Shepherd cannot guess that restarting =E2=80=98udev=E2=80=99 or =E2=80=98file-system= -xyz=E2=80=99 is impractical (try it :-)). Leaf services like =E2=80=98ssh-daemon=E2=80=99 can generall= y be restarted, but whether or not now is a good time to do it is something only the user can decide. That=E2=80=99s why the only services which are s= afe to restart right away are those currently stopped (and those that can be hot-swapped like nginx.) Thus I think it=E2=80=99s reasonable to print a message along the lines of: The following services were upgraded: =E2=80=A6 Please run =E2=80=9Cherd restart SERVICE=E2=80=9D to stop, upgrade, and r= estart services that were not automatically upgraded. WDYT? Thanks, Ludo=E2=80=99.