From 168cc74dc4150c127b9800a1100831a19b4e4336 Mon Sep 17 00:00:00 2001 From: Johan De Wit Date: Tue, 18 Jul 2023 14:23:25 +0200 Subject: [PATCH] [mongos] set fork off by default (see issue #667) --- manifests/mongos/params.pp | 2 +- manifests/params.pp | 2 +- spec/classes/mongos_spec.rb | 1 - spec/classes/server_spec.rb | 6 +----- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/manifests/mongos/params.pp b/manifests/mongos/params.pp index 6753d202f..3b06eaebd 100644 --- a/manifests/mongos/params.pp +++ b/manifests/mongos/params.pp @@ -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' } } diff --git a/manifests/params.pp b/manifests/params.pp index f0e1e8b8a..dc7781518 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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': { diff --git a/spec/classes/mongos_spec.rb b/spec/classes/mongos_spec.rb index b90f1d116..f0ce210c4 100644 --- a/spec/classes/mongos_spec.rb +++ b/spec/classes/mongos_spec.rb @@ -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 diff --git a/spec/classes/server_spec.rb b/spec/classes/server_spec.rb index b328dbe39..fe1995cff 100644 --- a/spec/classes/server_spec.rb +++ b/spec/classes/server_spec.rb @@ -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') }