-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Add advanced replica set configuration #478
Add advanced replica set configuration #478
Conversation
7c68601
to
a3ed9e0
Compare
5eb8eef
to
4f862f2
Compare
arbiter configuration is made through member, not through arbiter parameter. |
@DeathBorn great! This pull request can handle all the point of #102 ... |
it is running on production :) |
@@ -427,7 +427,7 @@ Mutually exclusive with `replset_members` param. | |||
```puppet | |||
class mongodb::server { | |||
replset => 'rsmain', | |||
replset_config => { 'rsmain' => { ensure => present, members => ['host1:27017', 'host2:27017', 'host3:27017'] } } | |||
replset_config => { 'rsmain' => { ensure => present, settings => { heartbeatTimeoutSecs => 15, getLastErrorModes => { ttmode => { dc => 1 } } }, members => [{'host'=>'host1:27017', 'tags':{ 'dc' : 'east'}}, { 'host' => 'host2:27017'}, 'host3:27017'] } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change here to the members array is a breaking change, right? If I see this correctly, the old syntax isn't working anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it is backwards compatible.
['host1:27017', 'host2:27017', 'host3:27017']
would work as well as
[{'host'=>'host1:27017'},'host2:27017', 'host3:27017']
or
[{'host'=>'host1:27017', 'tags':{ 'dc' : 'east'}}, { 'host' => 'host2:27017'}, { 'host' => 'host3:27017'}]
because internally, this is converted to an array of hashes
Thanks! |
Add advanced replica set configuration
rs.config()["settings"]
hash can be providedrs.config()["members"]
replset members can be either an array of host strings like before or hashes to have custom configurationExamples
or