Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 4.2.1, PUP 4.2.2
-
None
-
None
-
1
-
Client 2016-04-20
-
Bug Fix
-
Description
Overview
Statically-enabled systemd service is treated like SysV init scripts - enabled each run. One of the example is 'dbus' / 'messagebus' service which is not using SysV init script.
# systemctl is-enabled dbus.service
|
static
|
# ls /usr/lib/systemd/system/multi-user.target.wants/|grep dbus
|
dbus.service
|
This is the manifest that is used in the test:
package { 'dbus': ensure => installed, }
|
$dbus_service = $::operatingsystemmajrelease ? {
|
'5' => 'messagebus',
|
'6' => 'messagebus',
|
'7' => 'dbus',
|
}
|
service { 'messagebus':
|
ensure => running,
|
name => $dbus_service,
|
enable => true,
|
require => Package['dbus'],
|
}
|
Every puppet run changes enabled from 'false' to 'true':
[root@pe-centos7-master ~]# puppet apply /tmp/test.pp
|
Notice: Compiled catalog for pe-centos7-master in environment production in 0.93 seconds
|
Notice: /Stage[main]/Main/Service[messagebus]/enable: enable changed 'false' to 'true'
|
Notice: Applied catalog in 0.30 seconds
|
Workaround
Setting provider => redhat on services that use init scripts instead of systemd units should work around the issue.