Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mongodb-shard.conf.erb #591

Merged
merged 4 commits into from
Sep 4, 2020
Merged

Update mongodb-shard.conf.erb #591

merged 4 commits into from
Sep 4, 2020

Conversation

andreish
Copy link
Contributor

@andreish andreish commented Sep 3, 2020

fix the bind_ip usage in mongdb-shard.conf.erb, it is defined as array in manifests but config file wants it as a string ( comma separated list of ip adresses )

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

fix the bind_ip usage in mongdb-shard.conf.erb, it is defined as array in manifests but config file wants it as a string ( comma separated list of ip adresses )
@ekohl
Copy link
Member

ekohl commented Sep 3, 2020

Good catch. There are tests for server:

describe 'with specific bind_ip values and ipv6' do
let :params do
{
bind_ip: ['127.0.0.1', 'fd00:beef:dead:55::143'],
ipv6: true
}
end
it do
is_expected.to contain_file(config_file).
with_content(%r{^net\.bindIp: 127\.0\.0\.1\,fd00:beef:dead:55::143$}).
with_content(%r{^net\.ipv6: true$})
end
end
describe 'with specific bind_ip values' do
let :params do
{
bind_ip: ['127.0.0.1', '10.1.1.13']
}
end
it { is_expected.to contain_file(config_file).with_content(%r{^net\.bindIp: 127\.0\.0\.1\,10\.1\.1\.13$}) }
end

However, these don't exist for mongos. Could you add these so we don't risk this in the future?

@ekohl ekohl added the bug Something isn't working label Sep 3, 2020
add test case for bind with multiple ip
@@ -12,6 +12,16 @@
'/etc/mongodb-shard.conf'
end
end

describe 'with specific bind_ip values' do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind moving this below the context 'with defaults' block? I think it's good to always first list tests with defaults, then variations on that.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ekohl ekohl merged commit 9e3dc4d into voxpupuli:master Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants