From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KCh/A6dx2GLdCgAAbAwnHQ (envelope-from ) for ; Wed, 20 Jul 2022 23:20:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2AqNA6dx2GJeegAA9RJhRA (envelope-from ) for ; Wed, 20 Jul 2022 23:20:39 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 328A512126 for ; Wed, 20 Jul 2022 23:20:38 +0200 (CEST) Received: from localhost ([::1]:60902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEH7V-00023x-2w for larch@yhetil.org; Wed, 20 Jul 2022 17:20:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEH6w-00023Y-H1 for bug-guix@gnu.org; Wed, 20 Jul 2022 17:20:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEH6w-0006WF-6x for bug-guix@gnu.org; Wed, 20 Jul 2022 17:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEH6v-0002dN-UN for bug-guix@gnu.org; Wed, 20 Jul 2022 17:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55898: Services depending on new Shepherd features may fail until reboot Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 20 Jul 2022 21:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55898 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: GNU Debbugs , Maxime Devos , 55898@debbugs.gnu.org Received: via spool by 55898-submit@debbugs.gnu.org id=B55898.165835199710105 (code B ref 55898); Wed, 20 Jul 2022 21:20:01 +0000 Received: (at 55898) by debbugs.gnu.org; 20 Jul 2022 21:19:57 +0000 Received: from localhost ([127.0.0.1]:36185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEH6r-0002cu-1Q for submit@debbugs.gnu.org; Wed, 20 Jul 2022 17:19:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEH6o-0002cd-3m; Wed, 20 Jul 2022 17:19:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEH6i-0006ON-74; Wed, 20 Jul 2022 17:19:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=nvJ0LMfkwpO95UeZJVfkVRoOKjIvGVfuI9yXOXaAuRw=; b=mIg7/Ic+7NbaxcbEqvGH XwrZ0tffLIwwHTbI0DwJ0XyZplvB/T4Y6DCCQ16/35+/vp7tjTgauWhdeFkCxt815ZLvPCdhk8JsJ M0OB7K/7JIgCUWWJwPo2e9e18xCP20KkPYYw1y0DSr0Dxdy0HCpxW+SHQn+/QPyDJWTBqGkhUlOOe uqX4PUuMrPTpD/KvXJJ+sQcYS6J7KGikHdKiCn2dskRyMT82MvZsCl5w/HkIwt8mPLU1il5wOtedp cswILq01clf9kdwT4BdtpDAYN5hoSNoGIU4tti6oa37m7cmReMN7dNgSfmpEdNgE1Vdwjt38kQxRw 9zbhA/b72PTRgQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56462 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEH6h-0008UN-JZ; Wed, 20 Jul 2022 17:19:48 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a6ajg2zv.fsf@gmail.com> <5521716772922285f7c6bc381c82613026eebbd9.camel@telenet.be> <87bkuvdoe4.fsf@gmail.com> <87r13ex7nw.fsf_-_@gmail.com> <87mtdl2a7u.fsf_-_@gmail.com> <87ilo9294m.fsf@gmail.com> Date: Wed, 20 Jul 2022 23:19:44 +0200 In-Reply-To: <87ilo9294m.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 06 Jul 2022 18:01:45 -0400") Message-ID: <87a693pjm7.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658352038; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=nvJ0LMfkwpO95UeZJVfkVRoOKjIvGVfuI9yXOXaAuRw=; b=leAUV0nMOIUwWLzmhuhHTI5bVzi6vOGYejGMqzozwT/LRp541O2TPTh9FukbB+EEcmBg6M UIw7lQjfMKsZDpNafHP5ttGoGIxIHdvkGCJdR7z9DXcueXcj7YnzTBw43UAMQCJ/nTkJKo Niou5dKC3m/Ga82JlPCLTcjqhu7VLlS0EZYGj+CC8zfko+aTef/AzYAeZkEowLN7aGVMmg n8dbnjqWY8rlMU1ZPcyBTjkI2FhN7SUC6lQI3fditho5tgEh+QL2Wqqn0h7TsuynYIDfY9 65DkFNwROvjtXP5RdAZvwRqM/uksvZwsuI76olW4v6Ehpz/3nWMWZAMqOgik/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658352038; a=rsa-sha256; cv=none; b=IwahDsdBq4jo9TRB7R6gEQ7FX9ogeoN67OKNrSia4jnKqIQjPwbzJZ8zMkMvrRWGpLRkgX i8bGks6GecXBaoOAlDzyWz0cAZwuk4NfH/tsI0cx6EedDc7Mh8nDCkfv6ILZgCWTXXQG1x AWHkNeOAnaF7NpE02TaB9bElmur9eEgcnLzMBNJBflT1FXVyV46J6ONGAauBu0kINVeThe yL6+ew8iw6HxIFo0UhpsyBZk+k/s7WzQCJPXonJjKbXM4wutZMNuimMLc2OB83nJUKK9Si vrFyQya8uV58zVPnBTzNT5SSgquVax1+24A/8Wq2Wx0RNIUQgf0yYXNUs7qR/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="mIg7/Ic+"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.83 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="mIg7/Ic+"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 328A512126 X-Spam-Score: -0.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: HY8bqN9aZa9M Hi! Maxim Cournoyer skribis: >> Perhaps services should allow specifying the minimum required Shepherd >> version, which Shepherd could ensure is met before attempting to restart >> a service, printing something like: >> >> 'Could not restart service X due to unmet Shepherd version requirement; >> the service will continue unchanged until the next reboot' >> >> or something similar. Yes. The issue is that we=E2=80=99re more free-style than systemd: we=E2= =80=99re basically loading code live in the running Shepherd. So we have to write that code such that it works with older Shepherd versions. This is why we have things like conditions on (defined? 'make-inetd-constructor) and the likes, with a fallback. >> I've re-titled the bug, as this isn't specific to our jami service. > > I've asked in #systemd about what a similar situation would happen in > systemd-land, and here's what I've learned: > > 1. service units aren't reloaded automatically after new versions of > them are installed -- this effectively prevent the breakage seen here > (the jami service was reloaded and restarting manually it caused it to > fail). > > 2. a savvy user can still opt to force the new service to be reloaded > via 'systemctl daemon-reload'. In case the service update depends on > new systemd features, systemd would need to be restarted itself, via > 'systemctl daemon-reexec'. The later command is interesting, but its > documented as a debugging tool [0]: > > daemon-reexec > > Reexecute the systemd manager. This will serialize the manager > state, reexecute the process and deserialize the state again. This > command is of little use except for debugging and package > upgrades. Sometimes, it might be helpful as a heavy-weight > daemon-reload. While the daemon is being reexecuted, all sockets > systemd listening on behalf of user configuration will stay > accessible. > > [0] https://www.freedesktop.org/software/systemd/man/systemctl.html# > > systemd folks told me it is not typically run in systemd package upgrade > hooks, but perhaps some distribution do this (I don't know). > > So the situation is not very different in systemd vs shepherd, except > that we more aggressively load the new service definitions, potentially > leading to breakage. I think any upgrade, be it =E2=80=98guix system reconfigure=E2=80=99 or =E2= =80=98apt dist-upgrade=E2=80=99, is likely to end up loading new service definitions= =E2=80=94Guix System isn=E2=80=99t more aggressive in that respect. The main difference is that our services are code and that they might depend on specific Shepherd APIs. It=E2=80=99s a much more direct dependen= cy compared to .service files I guess. Thanks, Ludo=E2=80=99.