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

Add sets_creation so we can disable this class on Arbitrator servers when auth is enabled #661

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JvGinkel
Copy link
Contributor

@JvGinkel JvGinkel commented Jan 25, 2023

…while auth is enabled

Pull Request (PR) description

On arbitrator servers you get the following message when auth is enabled:

Notice: /Stage[main]/Mongodb::Replset/Mongodb_replset[example_set]/ensure: created (corrective)
Warning: Host mongoarb01:27017 is available, but you are unauthorized because of authentication is enabled: true

In debug mode you can see:

Debug: Request failed: 'Execution of '/usr/bin/mongo admin --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); printjson(rs.conf())' returned 252: uncaught exception: Error: Could not retrieve replica set config: {

      "ok" : 0,

      "errmsg" : "not authorized on admin to execute command { replSetGetConfig: 1.0, lsid: { id: UUID(\"a2213cd2-e6c4-4d15-bf29-d01b7a54a838\") }, $db: \"admin\" }",

      "code" : 13,

      "codeName" : "Unauthorized"

} :

The admin user has all the needed rights but this errmsg keeps telling us it has not.

For this reason I created a variable so we can disable this class on our arbitrator nodes by setting:
mongodb::replset::sets_creation: false

This Pull Request (PR) fixes the following issues

@bastelfreak bastelfreak changed the title Add sets_creation so we can disable this class on Arbitrator servers … Add sets_creation so we can disable this class on Arbitrator servers while auth is enabled Jan 26, 2023
@JvGinkel JvGinkel changed the title Add sets_creation so we can disable this class on Arbitrator servers while auth is enabled Add sets_creation so we can disable this class on Arbitrator servers when auth is enabled Jan 26, 2023
@JvGinkel
Copy link
Contributor Author

JvGinkel commented Mar 7, 2023

Anything needed be done to get this merged? We are running now in a fork and would like to switch back to this public version of the module.

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

Successfully merging this pull request may close these issues.

1 participant