-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow bind address of 127.0.0.1 in _cluster_setup for single node #593
Comments
If possible I'd like to patch this pre-2.1 if we can. The work is pretty straightforward, but we'll want to write tests for it ideally. |
The way forward is definitely
|
OK, so I've started implementation, and ran into a concern during the process, contingent upon the fact that the setup app currently determines if a cluster is "finished" setup by checking for the presence of One scenario that worries me a lot: imagine an automated deployment tool (Chef/Puppet/Ansible/etc.) using I realize this is extending the scope of this a little bit, but I'm having to monkey with the very bit that checks for the presence of those 3 databases anyway, so it's not too much trouble. So, the changes are:
Something for the future: people have been asking for the Setup tab in Fauxton to disappear once the cluster is set up. This could be powered by |
First PR is up. Once that's confirmed I'll go over to the Fauxton side of things. |
Also TODO: Docs PR once the other PR lands. |
Time for me to work on Fauxton and get this change exposed there. Once that's done, I'll update the documentation. |
PR up. I had missed that the latest version of the couchdb-setup application now requires a Once the PR lands, and Fauxton is tagged, and I bump |
PR closed. Just have documentation now... |
Final PR is up. This is the last thing we need for a 2.1 RC! 🥂 |
Expected Behavior
A user should be able to configure a single node CouchDB installation to bind to
127.0.0.1
through the Fauxton Setup wizard or via the/_cluster_setup
endpoint.Current Behavior
Right now, if you use Fauxton to configure a single node CouchDB installation, you are forced to set a bind address other than
127.0.0.1
. The same is true for the/_cluster_setup
endpoint.While this makes sense for configuring an actual cluster, it does not for a single node setup.
Possible Solutions
I see two ways to solve this problem:
Change Fauxton's wizard for single node setup to directly access the
/_node/couchdb@localhost/_config
(substituting the correct node name as queried via/_membership
) endpoint to alter the admin user, bind address and port as desired.Improve the
/_cluster_setup
endpoint to accept a new"action": "enable_single_node"
that tolerates binding to127.0.0.1
. This would have to be paired with changing the validation function in Fauxton to accept that bind address when in the single node workflow.I have a mild preference for 2, but 1 requires less work on the backend, and doesn't abuse an endpoint intended for setting up clusters to set up a single node as well.
Input from @garrensmith and @janl requested.
Steps to Reproduce (for bugs)
/_cluster_setup
end point to do the same thing. It also fails.Context
Real world users very often expect to have a single node CouchDB installation bound to localhost only.
The text was updated successfully, but these errors were encountered: