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

User management in replicasets / sharding #344

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

cjhubert
Copy link

@cjhubert cjhubert commented Oct 9, 2014

The goal of this PR is to fix the inability to create users in a sharded / replicaset cluster. The main problems were:

  1. It was basing whether to authenticate with the node / create the admin user based on node[mongodb][config][auth] = true. However, auth=true is not a valid ini setting for mongos instances, so mongos would fail to start. (Solved this by creating a separate variable called mongos_create_admin which should be set to true on mongos instances.)
  2. The mongo ruby driver would fail to connect to mongo while it was in the process of configuring the nodes for replicaset and sharding. According to the FAQ, reconnections are not handled by the driver, and should be handled solely by the application. (Solved by adding in retires, similar to ones that already existed in the libraries file.)

This PR also includes the separation of [admin][user/pass] and [authentication][user/pass] so that users should be able to change the administrator password of existing administrators.

An example of this working in chef-solo Vagrant can be found here.

Issues: #333, #327, #326

…o users-in-replicasets

Conflicts:
	providers/user.rb
@janemiceli
Copy link

Is it possible to get this merged?

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

Successfully merging this pull request may close these issues.

3 participants