Skip to content

Commit

Permalink
[mongos] set fork off by default (see issue voxpupuli#667)
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan De Wit committed Jan 20, 2024
1 parent a70205a commit 7af3388
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion manifests/mongos/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
$pidfilepath = '/var/run/mongodb/mongos.pid'
$unixsocketprefix = '/var/run/mongodb'
$logpath = '/var/log/mongodb/mongos.log'
$fork = true
$fork = undef # https://github.com/voxpupuli/puppet-mongodb/issues/667
$service_template = 'mongodb/mongos/RedHat/mongos.service-dropin.epp'
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
$logpath = '/var/log/mongodb/mongod.log'
$pidfilepath = '/var/run/mongodb/mongod.pid'
$config = '/etc/mongod.conf'
$fork = true
$fork = undef # https://github.com/voxpupuli/puppet-mongodb/issues/667
$journal = true
}
'Debian': {
Expand Down
1 change: 0 additions & 1 deletion spec/classes/mongos_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
when 'RedHat', 'Suse'
expected_content = <<~CONFIG
configdb = 127.0.0.1:27019
fork = true
pidfilepath = /var/run/mongodb/mongos.pid
logpath = /var/log/mongodb/mongos.log
unixSocketPrefix = /var/run/mongodb
Expand Down
6 changes: 1 addition & 5 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@
with_content(%r{^systemLog\.path: #{log_path}$})
end

if facts[:os]['family'] == 'Debian'
it { is_expected.not_to contain_file(config_file).with_content(%r{fork}) }
else
it { is_expected.to contain_file(config_file).with_content(%r{^ fork: true$}) }
end
it { is_expected.not_to contain_file(config_file).with_content(%r{fork}) }

it { is_expected.to contain_file('/root/.mongoshrc.js').with_ensure('file').without_content(%r{db\.auth}) }
it { is_expected.to contain_file('/var/lib/mongo').with(ensure: 'directory', mode: '0750', owner: mongo_user, group: mongo_group) }
Expand Down

0 comments on commit 7af3388

Please sign in to comment.