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

PR: 478 doesnt work with arbiter param, it becomes a secondary.. #581

Open
gokuatkai opened this issue Apr 8, 2020 · 2 comments
Open

PR: 478 doesnt work with arbiter param, it becomes a secondary.. #581

gokuatkai opened this issue Apr 8, 2020 · 2 comments

Comments

@gokuatkai
Copy link

gokuatkai commented Apr 8, 2020

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

@crigertg
Copy link

crigertg commented Sep 7, 2021

Seems like that the PR completely removed the support for arbiters but kept the parameters.

@crigertg
Copy link

crigertg commented Sep 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants