unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>, 55444@debbugs.gnu.org
Subject: bug#55444: elogind startup race between shepherd and dbus-daemon
Date: Sat, 28 May 2022 10:13:26 +0200	[thread overview]
Message-ID: <87leumgjmh.fsf@jpoiret.xyz> (raw)
In-Reply-To: <878rqmelwm.fsf@gnu.org>

Hello Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

> The patch below address that: it changes the “Exec=” line of
> ‘org.freedesktop.login1’ to refer to a wrapper.  That wrapper connects
> to shepherd and waits until ‘elogind’ is started.
>
> That way, if dbus-daemon comes first, it won’t actually launch anything
> and instead wait for the Shepherd ‘elogind’ service to be up.  (And if
> it comes second, dbus-daemon won’t try to launch anything, so no
> spurious “already running” messages.)
>
> I tested it in a ‘desktop.tmpl’ VM, quickly logging in on tty1.  On
> /var/log/messages, you can see the “Activating ….login1” message from
> dbus-daemon, followed by “Service elogind started” from shepherd,
> followed by “Successfully activated ….login1” from dbus-daemon.
>
> The “elogind” system test passes too.
>
> Thoughts?  Objections?
>
> Ludo’.

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,
-- 
Josselin Poiret




  reply	other threads:[~2022-05-28  8:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  8:26 bug#55444: elogind startup race between shepherd and dbus-daemon Ludovic Courtès
2022-05-24  2:27 ` Maxim Cournoyer
2022-05-25 12:45   ` Ludovic Courtès
2022-05-24 19:25 ` Liliana Marie Prikler
2022-05-25 12:26   ` Ludovic Courtès
2022-05-27 13:54 ` Ludovic Courtès
2022-05-27 20:54 ` Ludovic Courtès
2022-05-28  8:13   ` Josselin Poiret via Bug reports for GNU Guix [this message]
2022-05-28 21:26     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87leumgjmh.fsf@jpoiret.xyz \
    --to=bug-guix@gnu.org \
    --cc=55444@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).