Skip to content

mongo images need to support auth in config files #176

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

Closed
sdanieru opened this issue Apr 26, 2017 · 4 comments
Closed

mongo images need to support auth in config files #176

sdanieru opened this issue Apr 26, 2017 · 4 comments

Comments

@sdanieru
Copy link

Our current setup for both production and dev deployments specify ssl parameters in a mongod.conf file; this is a common configuration approach and is endorsed by mongodb. Your recent changes to entrypoint.sh break backwards compatibility with any setups that use auth parameters in a config file. Specifically your check to connect to the db isn't compatible with auth specified in the config file.

We were lucky to pull one of your new images for a dev deployment and after investigation, discovered why the image was immediately shutting down after startup, but if we had deployed these images for our production systems, they all would have failed and we wouldn't have known why.

Since these are the 'official' mongo images on dockerhub, it seems reasonable that they support standard configuration: storing ssl and other auth parameters in config files. We sincerely hope that you restore support for this functionality.

At the very least, you should put a prominent warning in your documentation that the images in their current state do not support supplying auth/ssl params in config files.

@sdanieru
Copy link
Author

sdanieru commented Aug 17, 2017

Hey guys|gals,
I don't know when this changed, but I'm now able to launch mongo containers with ssl params defined in the conf file, not on the command line - wonderful! Was conf file parsing added? Can someone else confirm this is working for them as well?

@yvanwangl
Copy link

@sdanieru Do you mind to tell me how to launch container with ssl params use conf file. Thank you 👍

@tianon
Copy link
Member

tianon commented Dec 20, 2017

@sdanieru the change that was made was to only run our new initdb functionality if it's requested via environment variables (plus some additional detection for when the database is already initialized)

Additionally, there's currently a warning printed during the startup if --config is specified (since it causes exactly the issues you've described with our current solution, which is why #189 is still open and the initdb options aren't documented yet).

I've also got some in-progress changes to fix even that so that --config and our initdb behavior can be used together.

@tianon
Copy link
Member

tianon commented Dec 20, 2017

See #183 for the exact PR which probably fixed this for your environment.

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

3 participants