Open acooke91 opened 1 year ago
To add to this,
The rpm-supplied config file in mongodb 6.0.5 drops the lines below from the config file: fork: true # fork and run in background pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
The puppet module always sets the pidfilepath param to /var/run/mongodb/mongod.pid on redhat systems though, and the template file mongodb.conf.2.6.erb adds the below, resulting in a broken configuration for mongodb 6.0.5 onwards
<% if @fork or @pidfilepath -%> processManagement: <%- if @fork -%> fork: <%= @fork %> <%- end -%> <%- if @pidfilepath -%> pidFilePath: <%= @pidfilepath %> <%- end -%> <% end -%>
@acooke91 could you verify if this is solved by the 6.0.0 release?
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
What are you seeing
Since the most recent mongodb 6 rpm on RHEL8 (mongodb-org-server-6.0.5-1.el8.x86_64), the default forking configuration has changed in mongod.conf to permit systemd to fully manage this by removing the lines below from the systemd unit file PIDFile=/var/run/mongodb/mongod.pid Type=forking
Where mongod.conf file is managed puppet-mongodb-4.2.0, the lines below remained in mongod.conf, causing the service to fail post-upgrade. processManagement: fork: true pidFilePath: /var/run/mongodb/mongod.pid
I managed to make it work by either:
What behaviour did you expect instead
The default value for the $fork parameter should probably now be set to false in class mongodb::params for RHEL8 and possibly for other Enterpise Linux 8 based distributions.
Alternatively puppet-mongodb-4.2.0 should probably now manage the systemd unit file for mongdb to ensure the lines below are present, so that it will continue to work with the resultant mongd.conf file as it stands: PIDFile=/var/run/mongodb/mongod.pid Type=forking
Output log
Any additional information you'd like to impart
I have observed this breaking change since upgrading from mongodb-org-server-6.0.4-1.el8.x86_64 to mongodb-org-server-6.0.5-1.el8.x86_64 on Red Hat 8