[Pkg-puppet-devel] Bug#775795: Bug#775795: puppet: Service's debian provider assumes SysV init

Russ Allbery rra at debian.org
Wed Jan 21 06:20:16 UTC 2015


Faidon Liambotis <paravoid at debian.org> writes:

> On Debian systems (i.e. on $::operatingsystem == "debian"), the default
> provider is "debian"; this is a separate provider that inherits the
> "init" provider but overrides a few methods to add invoke-rc.d support.
> The systemd provider, on the other hand, is default only for osfamily
> "archlinux" and for osfamily "redhat" && operatingsystemmajrelease 7.

Is Puppet *using* invoke-rc.d for all actions?  If so, this should
actually work properly, I think, since that should use systemd where
appropriate.

Or did you mean update-rc.d instead of invoke-rc.d?

> However, this means that Service (without an explicit provider) is
> broken for at least those two use cases:
> - enable => false/true doesn't work for packages that ship a systemd
>   unit file,
> - Service doesn't work at all with user-supplied systemd units or for
>   (custom, mostly) packages that do not ship init.d scripts.

At first glance, and without looking at any of the details, it seems like
an appropriate fix would be for Puppet to just use the service command for
start/stop/restart/reload/status, and update-rc.d for enable/disable.
That should do the right thing in all three init systems.

-- 
Russ Allbery (rra at debian.org)               <http://www.eyrie.org/~eagle/>



More information about the Pkg-puppet-devel mailing list