From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 29 17:06:46 2022 Received: (at 55898) by debbugs.gnu.org; 29 Aug 2022 21:06:46 +0000 Received: from localhost ([127.0.0.1]:34025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSly1-0006Nn-Rr for submit@debbugs.gnu.org; Mon, 29 Aug 2022 17:06:46 -0400 Received: from mail-qk1-f175.google.com ([209.85.222.175]:46938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSly0-0006Nb-8V for 55898@debbugs.gnu.org; Mon, 29 Aug 2022 17:06:44 -0400 Received: by mail-qk1-f175.google.com with SMTP id a10so3232296qkl.13 for <55898@debbugs.gnu.org>; Mon, 29 Aug 2022 14:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc; bh=1SjmtTIgaw/Ch6CkkyLav3H49b2dd8z4KftQ/s1SE1k=; b=Gkr78BLqDJMv9Uvik09L71fTCcNUoDgO7Lp9JIC9XwZ2wBgdsNgkb+B5bF7HiaTEsr gSfk1dIuorku/g6rEH9eb9je19orgLcuJ+ykKuAiBQI/v2UoX8w4KNcAPuuleDKiJR9A Vgp3HPLlXAsD/fl04tzidmcBAShuzTQ0RWLUD5RyUGHOGyp9QzwhGjeM8PDdlUdzzqAv LAB84rnU4U6hwxsWBwtj09sM8Q4fOeoZUNNLbvnfhvynZpbQGjEBasan+LpEpzYAEChM Lr6/5Xru/8Tq8lu4/1KPzeXJLZsDB7jmIxGIwFKlnoXiGg+20JZdiM2D9Fem1PPCrmdx yTRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc; bh=1SjmtTIgaw/Ch6CkkyLav3H49b2dd8z4KftQ/s1SE1k=; b=hbsloQfaRmuXqxOaai9xMqM4dGUmX8lck44e5a2LDZSn7zsYjOWEGgExon9JdaIXjb JLr5fexn46PPyIQ2hH9R9s2/nHR7wnSkUfjsORBkyojnCpKabwO67XDmBAMp/S/xr3GL +0L5RKa9iSWztDZu1s5V9c7RffRr7857fdFJKK1fLJdhvAC5OxAzx2WsGi8U0+oITq1r 7xmLL+ChdNedjvhzFYZjaZKbmhnRnTc1U1k3s1DUbj+LsKo34I/7X6/qVj3/3bJngpgj 3QYi1ZOeEQc/T96uhkC/aZkvtPSAWgLd0c+MJ3fR64qFjRxDy4XrbXm5fK1uMlknwftu v7YQ== X-Gm-Message-State: ACgBeo2HaRdbUXSfAa4yBLwAaOh4wSbQa8ENkqUi3ZDlGSVU5dg0Xgtx oTu7xxNA9G0vZLQ8qbjKAlHV6wMU/9s= X-Google-Smtp-Source: AA6agR7ajQuyt2nVkOY2ThltQDEqIXK2tnN2/V7UTFNeeeCsTDP/kSU7szqoPoZMRq7s8DVdacG2Ow== X-Received: by 2002:a05:620a:f03:b0:6b6:6513:af63 with SMTP id v3-20020a05620a0f0300b006b66513af63mr9627933qkl.312.1661807198465; Mon, 29 Aug 2022 14:06:38 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id u3-20020a37ab03000000b006bc68cfcdf7sm6454017qke.13.2022.08.29.14.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 14:06:38 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#55898: Services depending on new Shepherd features may fail until reboot 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> <87a693pjm7.fsf_-_@gnu.org> <87r12fqf6j.fsf@gmail.com> <87y1v75fo0.fsf@gnu.org> Date: Mon, 29 Aug 2022 17:06:36 -0400 In-Reply-To: <87y1v75fo0.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 29 Aug 2022 15:43:11 +0200") Message-ID: <8735debvz7.fsf@gmail.com> 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 55898 Cc: Maxime Devos , 55898@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: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> Ludovic Court=C3=A8s writes: > > [...] > >>> 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 saw that used somewhere, but I still think a minimally required >> Shepherd version field could be of use on services, for the following >> reasons: >> >> 1. Otherwise each services are left implementing ad-hoc solutions. >> >> 2. It's more complicated to be compatible with two Shepherd version than >> simply mentioning the minimum version required, and prevent the service >> from running until it is satisfied (especially on a system like Guix >> System where we *know* what is the current version of Shepherd >> available). > > I think it=E2=80=99s a situation similar to =E2=80=9Cfeature tests vs. id= entity tests=E2=80=9D > in build system configuration (checking whether the libc function you > want to use is available rather than checking whether =E2=80=98uname=E2= =80=99 returns > =E2=80=9CLinux=E2=80=9D), and for the same reason I tend to prefer featur= e tests as > shown above. Agreed, but the context differs wildly: while Autoconf or browsers for example really are facing a diversity of configuration, the version of Shepherd used in Guix System is known and controlled. So the only problems bound to happen are in this context: 1. New Shepherd version introduced in Guix (package upgrade). 2. New Shepherd features used by services. 3. Machine reconfigured using a commit including 1 and 2. The problems are temporary: upon a reboot the running Shepherd version will be the latest, and have all the features needed. Hence my suggestion to use something simple to improve the user experience of a user faced with 3. > I won=E2=80=99t pretend it=E2=80=99s pretty :-), but I don=E2=80=99t see = an improvement feasible > in the short term. > > In the long term, maybe we=E2=80=99d want the service API in the Shepherd= to be > more declarative, more like packages in Guix. But that=E2=80=99s more fo= r a 2.0 > horizon IMO. > > Perhaps we should close this issue unless it becomes actionable? It's a relatively narrow use case and it's relatively rare too, but I'd err on keeping it open until it gets fixed, whether in a definitive fashion or as a more limited one to help users facing 3. above. Thanks, and welcome back! Maxim