Skip to content

Commit

Permalink
(PUP-7129) Use systemd service provider for Debian 9 (Strech)
Browse files Browse the repository at this point in the history
Currently, the 'service' provider gets confused on a Debian 9 (stretch) (updated from Debian Jessie), when trying to restart services:

> Notice: /Stage[main]/Base::Ssh/File[/etc/ssh/sshd_config]/content: content changed '{md5}6c77ef6f38ca76a455809562c7f0a9a7' to '{md5}2f0a7d2e3d7cf30c3ba9eeff6af29189'
> Info: /Stage[main]/Base::Ssh/File[/etc/ssh/sshd_config]: Scheduling refresh of Service[sshd]
> Debug: /Stage[main]/Base::Ssh/File[/etc/ssh/sshd_config]: The container Class[Base::Ssh] will propagate my refresh event
> Debug: Executing: '/usr/sbin/service sshd status'
> Debug: Executing: '/usr/sbin/service sshd status'
> Debug: Service[sshd](provider=debian): Could not find sshd in /etc/init.d
> Debug: Service[sshd](provider=debian): Could not find sshd.sh in /etc/init.d
> Error: /Stage[main]/Base::Ssh/Service[sshd]: Failed to call refresh: Could not find init script for 'sshd'
> Error: /Stage[main]/Base::Ssh/Service[sshd]: Could not find init script for 'sshd'
> Debug: Prefetching parsed resources for ssh_authorized_key
> Debug: Class[Base::Ssh]: The container Stage[main] will propagate my refresh event
> Debug: Finishing transaction 47247593282280
> Debug: Storing state
> Debug: Stored state in 0.00 seconds
> Notice: Applied catalog in 0.57 seconds

This will add Debian 9 as `defaultfor` the systemd service provider.
  • Loading branch information
flokli authored and Iristyle committed Mar 10, 2017
1 parent abd866a commit d5a69fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/provider/service/systemd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
defaultfor :osfamily => :redhat, :operatingsystem => :fedora
defaultfor :osfamily => :suse
defaultfor :osfamily => :coreos
defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => "8"
defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["8", "9"]
defaultfor :operatingsystem => :ubuntu, :operatingsystemmajrelease => ["15.04","15.10","16.04","16.10"]
defaultfor :operatingsystem => :cumuluslinux, :operatingsystemmajrelease => ["3"]

Expand Down

0 comments on commit d5a69fb

Please sign in to comment.