unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: GNU Debbugs <control@debbugs.gnu.org>,
	Maxime Devos <maximedevos@telenet.be>,
	55898@debbugs.gnu.org
Subject: bug#55898: Services depending on new Shepherd features may fail until reboot
Date: Wed, 20 Jul 2022 23:19:44 +0200	[thread overview]
Message-ID: <87a693pjm7.fsf_-_@gnu.org> (raw)
In-Reply-To: <87ilo9294m.fsf@gmail.com> (Maxim Cournoyer's message of "Wed, 06 Jul 2022 18:01:45 -0400")

Hi!

Maxim Cournoyer <maxim.cournoyer@gmail.com> 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’re more free-style than systemd: we’re
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 ‘guix system reconfigure’ or ‘apt
dist-upgrade’, is likely to end up loading new service definitions—Guix
System isn’t more aggressive in that respect.

The main difference is that our services are code and that they might
depend on specific Shepherd APIs.  It’s a much more direct dependency
compared to .service files I guess.

Thanks,
Ludo’.




  reply	other threads:[~2022-07-20 21:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11  5:53 bug#55898: jami service failing following 'guix deploy' update Maxim Cournoyer
2022-06-11 14:51 ` Maxime Devos
2022-06-14 19:40   ` Maxim Cournoyer
2022-06-24 17:52     ` Maxim Cournoyer
2022-06-24 18:01     ` bug#55898: jami service failing following reconfigure Maxim Cournoyer
2022-07-06 21:38       ` bug#55898: jami service failing following 'guix deploy' update Maxim Cournoyer
2022-07-06 22:01         ` Maxim Cournoyer
2022-07-20 21:19           ` Ludovic Courtès [this message]
2022-07-21  4:10             ` bug#55898: Services depending on new Shepherd features may fail until reboot Maxim Cournoyer
2022-08-29 13:43               ` Ludovic Courtès
2022-08-29 21:06                 ` Maxim Cournoyer
2022-08-30  7:33                   ` Ludovic Courtès
2022-08-30  9:35                     ` Maxime Devos
2022-08-30 13:50                       ` Ludovic Courtès
2022-09-01 13:18                     ` Maxim Cournoyer
2022-09-01 13:28                       ` Maxime Devos
2022-09-01 13:51                       ` Ludovic Courtès
2022-09-01 19:16                         ` Maxim Cournoyer
2022-09-02  9:10                           ` 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=87a693pjm7.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=55898@debbugs.gnu.org \
    --cc=control@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    --cc=maximedevos@telenet.be \
    /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).