From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Zancanaro Subject: bug#22039: [PATCH] 'guix system reconfigure' must start/restart/stop services Date: Mon, 24 Sep 2018 09:06:38 +1000 Message-ID: <87lg7ru83l.fsf@zancanaro.id.au> 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> <87efdov32l.fsf@gnu.org> <87sh24qtes.fsf@zancanaro.id.au> <87r2hn2hbo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4DT2-0005jx-AW for bug-guix@gnu.org; Sun, 23 Sep 2018 19:07:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4DT0-0006py-02 for bug-guix@gnu.org; Sun, 23 Sep 2018 19:07:07 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87r2hn2hbo.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: 22039@debbugs.gnu.org Hey Ludo=E2=80=99, On Fri, Sep 21 2018, Ludovic Court=C3=A8s wrote: > What would you put there? Do you have concrete examples? I would have three possible values: 'never, 'always, 'manual. 'never would mean that the service should never be restarted. This=20 is for things like udev, or the filesystems, which should never be=20 restarted on a running system. 'always would mean that the service is always safe to restart. I=20 don't immediately know what services would fit in this category=20 (maybe sshd, given Efraim's comment; maybe ntpd? I'm sure there=20 are others). Things like nginx will probably not fall into this=20 category, because they involve some downtime when restarting.=20 Reloading their configuration (via a "reload" action, or similar)=20 is not enough because the binary and/or libraries might have=20 changed (and, in the worst case, might have an incompatible=20 configuration format, although I would expect that to be=20 exceedingly rare). 'manual would mean that the service should be restarted, but it=20 need to be done at an appropriate time. This should prompt the=20 user with the names of the services, and we should provide an=20 option to guix system reconfigure to restart these services as=20 part of the reconfigure. We could call the option=20 "--restart-services". >> [ ... ] I just have to know that to restart wicd I have to run=20 >> "herd restart networking". > > There=E2=80=99s =E2=80=98guix system search=E2=80=99 that provides this k= ind of info=20 > (see ), but I agree we=20 > could do better. I actually checked this before sending my previous message, but I=20 didn't see that it includes "shepherdnames". I tested with "guix=20 system search wicd" which didn't show any, but I see now that=20 searching "guix system search xmpp" does helpfully show how to=20 restart the service. > We can go with your patch and a message along the lines of what=20 > we discussed above, and then work on the improvements you=20 > mentioned, one at a time. That way we=E2=80=99ll have the warm feeling=20 > of having achieved something, even if there=E2=80=99s more to come. :-) I won't be able to look at writing the code for this for a few=20 weeks, but hopefully I'll get to it around mid- to late-October. Carlo