puppet-mongodb
puppet-mongodb copied to clipboard
mongodb::globals value for group param being ignored
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: Enterprise 2017.2
- Ruby: ruby 2.1.9p490 (2016-03-30 revision 54437) [x86_64-linux]
- Distribution: Red Hat Enterprise Linux Server release 7.6 (Maipo)
- Module version: 2.4.1
How to reproduce (e.g Puppet code you use)
class { 'mongodb::globals' :
manage_package_repo => true,
version => '3.6.12-1.el7',
group => 'mongodg',
} -> class { 'mongodb::server':
ensure => present,
dbpath => '/data/mongo/db',
dbpath_fix => true,
pidfilepath => '/var/run/mongodb/mongod.pid',
logpath => '/data/mongo/log/mongod.log',
logappend => true,
fork => true,
port => 27017,
journal => true,
}
What are you seeing
Systemd unit file being created with default group instead of my overridden value specified in the globals settings causing service to fail at startup:
[Service] User=mongod Group=mongod Environment="OPTIONS=-f /etc/mongod.conf" ExecStart=/usr/bin/mongod $OPTIONS ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb
(Note both the "Group=" line and the "ExecStartPre=" line don't specify the group I set in the globals.
What behaviour did you expect instead
That is would use my specified group name instead of the default.
Output log
Any additional information you'd like to impart
If I manually update the systemd unit file to specify the correct group, the next agent run succeeds and mongod is started.
any update on this one?