From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 09 11:59:48 2018 Received: (at 33508) by debbugs.gnu.org; 9 Dec 2018 16:59:48 +0000 Received: from localhost ([127.0.0.1]:40190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gW2Qm-0004m6-FH for submit@debbugs.gnu.org; Sun, 09 Dec 2018 11:59:48 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gW2Qk-0004ls-N9 for 33508@debbugs.gnu.org; Sun, 09 Dec 2018 11:59:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gW2Qb-0005zx-Gw for 33508@debbugs.gnu.org; Sun, 09 Dec 2018 11:59:41 -0500 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 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW2Qb-0005zp-D2; Sun, 09 Dec 2018 11:59:37 -0500 Received: from [109.190.253.16] (port=58572 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gW2Qa-0006Sx-Un; Sun, 09 Dec 2018 11:59:37 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Carlo Zancanaro Subject: Re: [bug#33508] [PATCH] gnu: Add ability to restart services on system reconfigure References: <87efb8m5gy.fsf@zancanaro.id.au> Date: Sun, 09 Dec 2018 17:59:29 +0100 In-Reply-To: <87efb8m5gy.fsf@zancanaro.id.au> (Carlo Zancanaro's message of "Mon, 26 Nov 2018 22:41:01 +1100") Message-ID: <87lg4yws9a.fsf@gnu.org> 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: 33508 Cc: 33508@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Carlo, Sorry for not commenting earlier! Carlo Zancanaro skribis: > The broad idea is to add a new field to our guix shepherd services: > restart-strategy. There are three valid values: > > - always: this service is always safe to restart when running > reconfigure > > - manual: this service may not be safe to restart when running > reconfigure - a message will be printed telling the user to restart > the service manually, or they can provide the --restart-services flag > to reconfigure to automatically restart them > > - never: this service is never safe to restart when running > reconfigure (eg. udev) > > I have added the flag to the guix daemon's shepherd service to show > how it works. I tested this by changing my substitute servers in > config.scm, and after running "reconfigure" I saw my updated > substitute servers in ps without having to run "sudo herd restart > guix-daemon". In what sense is guix-daemon =E2=80=9Calways safe to restart=E2=80=9D? It= =E2=80=99s actually a difficult question for me. You could argue that its child guix-daemon processes will remain live when we restart it, meaning that client connections remain active and valid. I believe this is indeed the case, though it would be worth double-checking. Now, if safe-to-restart means that we automatically invoke the =E2=80=9Cres= tart=E2=80=9D action on guix-daemon, that means that anything that depends on it (=E2=80=98guix-publish=E2=80=99, =E2=80=98cuirass=E2=80=99, =E2=80=98hpcgui= x-web=E2=80=99, etc.) would be restarted as well (even though I *think* we don=E2=80=99t have to in this case.) But th= ese may not be safe to restart: for example, on may want =E2=80=98guix-publish= =E2=80=99 to run uninterrupted. Furthermore, whether something is =E2=80=9Csafe to restart=E2=80=9D is real= ly user policy. So the notion here should probably not be =E2=80=9Csafe to restart=E2=80=9D= but rather =E2=80=9Clive-upgradable=E2=80=9D. sshd, nginx, and maybe guix-daemon can more or less be live-upgraded, meaning that (1) existing connections are preserved but future connections will talk to the new daemon, and as a corollary, (2) dependent services do not need to be stopped & restarted. Does that make sense? Thanks, Ludo=E2=80=99.