Bug#152955: force-reload should not start the daemon if it is not running

Ansgar Burchardt ansgar at debian.org
Tue Apr 21 08:48:32 BST 2015


Control: block 782993 by 152955

Hi,

the meaning of the "force-reload" action comes up again with systemd:

 - systemctl implements "force-reload" as documented by LSB, that is
   a service not running does *not* get started,
 - the init script integration maps "/etc/init.d/X force-reload" to
   "systemctl force-reload X",
 - but "service X force-reload" gets mapped to "systemctl X
   reload-or-restart" which *does* start a service not running before.

As I understand the discussion, Policy currently documents that
"force-reload" *should* start services not already running and is
contradicting LSB here; on the other hand initscripts behave in both
ways, at least back when the bug was discussed initially.

So I would like to re-raise the issue and propose the change suggested
by Sven Mueller[1] again:

| Regarding this special case "force-reload" command to init.d scripts,
| currently maintainers have the choice between two differen RC bugs:
| 1) Implement "force-reload" as a "restart" alias if "reload" is not
|    available and violate LSB (which, according to the RMs means an RC
|    bug).
| 2) Implement "force-reload" as a conditional "restart" alias only
|    executed when the service is already running. This violates current
|    policy wording and is therefor also an RC bug.
| At the very least, I would suggest the following wording of the
| "force-reload" description:
|
| ********************************************************************
| <tag><tt>force-reload</tt></tag>
| <item>cause the configuration to be reloaded if the service supports
| this. If it doesn't support reloading, restart the service. Note that
| the service should not get started if it wasn't already running.</item>
| ********************************************************************
|
| This would cause non-LSB compliant behaviour to be a non-RC bug and make
| LSB-compliant behaviour (which, BTW, is already implemented by _many_
| init scripts) perfectly OK with policy.

This makes the behaviour as defined by LSB and as implemented in systemd
a "should", making scripts behave consistent wheather systemd in used as
init or not.

Ansgar

  [1] <https://bugs.debian.org/152955#35>



More information about the Pkg-systemd-maintainers mailing list