puppet-mongodb
puppet-mongodb copied to clipboard
PR: 478 doesnt work with arbiter param, it becomes a secondary..
Hello, I upgraded from 2.1.0 to 2.4.1, and I encountered a problem where my arbiter started as a secondary. After some search I found that this PR: https://github.com/voxpupuli/puppet-mongodb/pull/478/files look like the reason why.
I used to use arbiter configured like this:
mongodb_replset { 'my-rep-set':
ensure => present,
members => [
'node-1.hello.com:27017',
'node-2.hello.com:27017',
'node-arbiter.hello.com:27017'
],
arbiter => 'node-arbiter.hello.com:27017',
}
Now the arbiter becomes a secondary, could anyone explain me how to fix that please? For now reverting to 2.1.0
Seems like that the PR completely removed the support for arbiters but kept the parameters.
To configure an arbiter node the parameter must be given in the members
parameter:
[
{
"file": "/etc/puppetlabs/code/environments/11164_mongodb_arbiter/modules/mongodb/manifests/server.pp",
"type": "Class",
"title": "Mongodb::Replset",
"line": 140,
"resource": "51f894d009203cf274b480ed915d85a43dad0917",
"environment": "11164_mongodb_arbiter",
"certname": "arbiter",
"parameters": {
"sets": {
"arbiter_test": {
"ensure": "present",
"members": [
"mongo01:27017",
{
"host": "arbiter:27017",
"arbiterOnly": true
},
"mongo02:27017"
]
}
},
"before": [
"Mongodb::Db[admin]"
]
},
"exported": false
}
]
So to fix this issue:
- remove arbiter configuration parameters and functions
- update documentation
- update examples