From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kENuO+nZkWKDawAAbAwnHQ (envelope-from ) for ; Sat, 28 May 2022 10:14:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GN0uO+nZkWIkyAAAauVa8A (envelope-from ) for ; Sat, 28 May 2022 10:14:33 +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 85CC438CC for ; Sat, 28 May 2022 10:14:33 +0200 (CEST) Received: from localhost ([::1]:49070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nurai-000579-4y for larch@yhetil.org; Sat, 28 May 2022 04:14:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuraE-00056z-QV for bug-guix@gnu.org; Sat, 28 May 2022 04:14:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuraE-0000zr-G0 for bug-guix@gnu.org; Sat, 28 May 2022 04:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuraE-0006cs-8c for bug-guix@gnu.org; Sat, 28 May 2022 04:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55444: elogind startup race between shepherd and dbus-daemon Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 28 May 2022 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55444 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 55444@debbugs.gnu.org Received: via spool by 55444-submit@debbugs.gnu.org id=B55444.165372561525430 (code B ref 55444); Sat, 28 May 2022 08:14:02 +0000 Received: (at 55444) by debbugs.gnu.org; 28 May 2022 08:13:35 +0000 Received: from localhost ([127.0.0.1]:36374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nurZn-0006c5-9o for submit@debbugs.gnu.org; Sat, 28 May 2022 04:13:35 -0400 Received: from jpoiret.xyz ([206.189.101.64]:51470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nurZh-0006bt-Ts for 55444@debbugs.gnu.org; Sat, 28 May 2022 04:13:33 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 9D1051851D2; Sat, 28 May 2022 08:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1653725608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iW4vpRQQdadF0RM/pqy4HTWtSBQjtwtVlDv4s0h3uCc=; b=M/UgrtbaU3vBzW2dGUmvW019EES/AMk92mvREp0NuyzhA6X2ZyoDW6JdCaYHNVjeflY6P7 f9hGJWeHFuwIyw6P0IFq/bo1b24nnp48aTW/8wRGop7CUPbEbyeK+41EAXGajwl3L4wKgS D1peTbDXuGlUNqZVYw/7+z9D59YKaqhh3PMfM3gthErOKwPZaRy0ffIeHXtvJOa/wkPU+s TCnYuCTyBOxsDwA9Zrgva2M2mLYXR/m2b7FZLv+LK7alcJQpj7nS+ChubgTS4iYyd0kI0e LH0tBIjVT8JUjdhXENODQU8ie76C2dANU3Fx9EolNCdAOu7boKSe4H6usvjIUg== In-Reply-To: <878rqmelwm.fsf@gnu.org> References: <877d6lc28o.fsf@inria.fr> <878rqmelwm.fsf@gnu.org> Date: Sat, 28 May 2022 10:13:26 +0200 Message-ID: <87leumgjmh.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / 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" Reply-to: Josselin Poiret From: Josselin Poiret via Bug reports for GNU 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=1653725673; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=iW4vpRQQdadF0RM/pqy4HTWtSBQjtwtVlDv4s0h3uCc=; b=c2YV95egR1GhVJMmJAw4a1TubSP6olJd+QVI0IF/UxFRPYCzLxYe97NvQiSxFVCURsrC1r eOdqklzs91EQ8EwlQ/Jv0XkhMzSFQNhzllRcYyJ9XXh1MnT/x0e+Q3FV/8u5817Vtp4flP hGQDqEFaFwDggJU+EtwNGZzTFPd4Op8jHnIfWr6EZHjJJi8KAJz0sci19IvgTMGOwbfRnE k0ffe1sP/WheGj3XPF7Q+xjN45boIFqnxnqks9+hvM6GE0TBNYtYvEXsF/3LkWucJaM4aO NzE1OdTndw7LsmDynUS8kePbCJfrVIDnLzM1hZFoHX/RCBvZhefkV79ircy8Hg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653725673; a=rsa-sha256; cv=none; b=PwAhbJcBlFi6LFHxMDkUuzq5vhz9O7MHL3aAgN6poeBaTfeP4cODPEBkCCc9BGZy4yOVd+ hTDFm9bxxDM2O0F5pNsgLmhUxFcLXnVe27FHoZNfmOpPrNl2bcHew+qgivN9K/bKOPbQSX QrrSnbf7EOIbqDApmrYzlQVab3w2uKWH1krfi8d3AWsUWA1WJGmoQnBB/21vh/+USTOgjP exZJrp3S4KyIoda++IVXH36DaHv4ejiMqYt93WHEUxUjxdGyH7OfBr+DosCy7VK/qG9qea QWT0PltBsXQEewLmUBQfDP+JfGAwY2xx7KI6PypKSrZCcFhX3y0gGrzsBCU0yA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b="M/Ugrtba"; 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: -2.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b="M/Ugrtba"; 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: 85CC438CC X-Spam-Score: -2.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: A35pCzBcP34L Hello Ludo, Ludovic Court=C3=A8s writes: > The patch below address that: it changes the =E2=80=9CExec=3D=E2=80=9D li= ne of > =E2=80=98org.freedesktop.login1=E2=80=99 to refer to a wrapper. That wra= pper connects > to shepherd and waits until =E2=80=98elogind=E2=80=99 is started. > > That way, if dbus-daemon comes first, it won=E2=80=99t actually launch an= ything > and instead wait for the Shepherd =E2=80=98elogind=E2=80=99 service to be= up. (And if > it comes second, dbus-daemon won=E2=80=99t try to launch anything, so no > spurious =E2=80=9Calready running=E2=80=9D messages.) > > I tested it in a =E2=80=98desktop.tmpl=E2=80=99 VM, quickly logging in on= tty1. On > /var/log/messages, you can see the =E2=80=9CActivating =E2=80=A6.login1= =E2=80=9D message from > dbus-daemon, followed by =E2=80=9CService elogind started=E2=80=9D from s= hepherd, > followed by =E2=80=9CSuccessfully activated =E2=80=A6.login1=E2=80=9D fro= m dbus-daemon. > > The =E2=80=9Celogind=E2=80=9D system test passes too. > > Thoughts? Objections? > > Ludo=E2=80=99. Great idea! The patch LGTM, although I'd argue that most of the wrapper code could belong in (gnu services herd), in something like (wait-for-services #:select? select? #:retries (n 20)) so that someone else doesn't end up recoding this for another service. Best, --=20 Josselin Poiret