[systemd-devel] [PATCH] Avoid reloading services when shutting down
Lennart Poettering
lennart at poettering.net
Tue Feb 3 12:52:35 PST 2015
On Tue, 03.02.15 20:50, Michael Biebl (mbiebl at gmail.com) wrote:
> >> Another option might be to pass --job-mode=ignore-dependencies instead
> >> of --no-block, which was created for usecases like this, even though
> >> it is frickin' ugly...
> >
> > For reload that should be fairly okay, as reload will quickly fail if
> > the unit isn't actually running, and if it is running its dependencies
> > already ought to be satisfied.
> >
> > I'll look into both, thanks for the hints!
>
> Keep in mind though, that you'll need to not only update "service",
> but also invoke-rc.d and the lsb-hook, which is used when someone
> calls /etc/init.d/foo directly.
>
> It's also magnitudes less efficient to spawn external binaries to get
> the system state then doing this check from within systemd itself.
>
> So I'm not really convinced that shifting the responsibility here to
> the scripts themselves is the better approach.
But note that this way you alter *all* queued jobs that way,
regardless if they are created with the assumptions of sysv behaviour
or if they were created in code that understands systemd's semantics,
and actually cares for the correct ordering..
I'd strongly recommend finding local solutions to the problems at hand
here, rather than changing behaviour for all other non-sysv code as
well...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list