Bug#982907: init-system-helpers: use new needs-reload/needs-restart unit interface
Felipe Sateler
fsateler at debian.org
Wed Aug 25 01:30:48 BST 2021
Hi!
On Tue, Aug 24, 2021 at 2:38 PM Niels Thykier <niels at thykier.net> wrote:
> Control: reassign -1 init-system-helpers
>
> Reassigning to init-system-helpers, quoting in full for the
> init-system-helpers maintainer's sake.
>
> On Tue, 16 Feb 2021 21:46:28 +0100 Niels Thykier <niels at thykier.net>
> wrote:
> > Luca Boccassi:
> > > Source: debhelper
> > > Priority: wishlist
> > > Tags: bookworm
> > > X-Debbugs-CC: pkg-systemd-maintainers at lists.alioth.debian.org
> > >
> > > Dear Maintainer(s),
> > >
> > > systemd v248 will ship with a new dbus/systemctl interface to mark a
> > > unit as needing reload/restart, and a new dbus/systemctl to queue all
> > > reload/restart jobs in a single command.
> > > The RPM packaging/scripts are changing to use this instead of custom
> > > batching.
> > >
> > > I'm opening this ticket to explore whether it would be
> > > possible/good/desirable to switch the debhelper tools to use this as
> > > well in the future.
> > >
> > > It looks like this:
> > >
> > > systemctl set-property foo.service Markers=needs-restart
> > > systemctl set-property bar.service Markers=needs-reload
> > > ...
> > > systemctl reload-or-restart --marked
> > >
> > > (or equivalent DBUS calls)
> > >
> > > References:
> > >
> > >
> https://github.com/systemd/systemd/commit/ff68472a20c208121b69ea13586f3105a219bc14
> > >
> https://github.com/systemd/systemd/commit/c9615f73521986b3607b852c139036d58973043c
> > > https://github.com/systemd/systemd/pull/18481/commits
> > >
> > > The advantage being, you can mark a unit inline, but then batch the
> > > actual jobs later/asynchronously.
> > >
> > > Note that, given the interface has just been merged and is not yet
> > > released, there is scope for improvements if there are debhelper-
> > > specific concerns to address, given the feature first use is the RPM's
> > > side of things.
> > >
> > > Thoughts?
> > >
> >
> > By the sound of it, this is something that might need to go into the
> > init system helpers that debhelper invokes in the maintscripts (possibly
> > with a trigger in the systemd side to do the batch reload/restart).
> >
> > @Michael: What is your view?
> >
>
Not Michael, but if I can offer my thoughts, this is not something that
could be done in i-s-h (or at least, not something that we could do
transparently). This is because presumably there are postinst scripts that
assume post-debhelper-block the new version is already running. So I
believe what would be needed is:
1. Support in i-s-h to activate this mode, probably via a new flag.
2. Support in debhelper to enable/disable this new method.
3. A trigger in systemd to do the final reload.
I believe requiring the new daemon version to be already updated by
postinst time would be quite rare, so I think point 2 could be enabled by
default in a new compat level.
Thoughts?
--
Saludos,
Felipe Sateler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20210824/cb0a395f/attachment-0003.htm>
More information about the Pkg-systemd-maintainers
mailing list