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 11, 2024
1 parent 1c1e888 commit 168cc74
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 @@ -40,7 +40,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 @@ -50,7 +50,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 @@ -30,7 +30,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 @@ -59,11 +59,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.not_to contain_exec('fix dbpath permissions') }
Expand Down

0 comments on commit 168cc74

Please sign in to comment.