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

1523 bye bye 5986 #2336

Merged
merged 12 commits into from
Dec 2, 2019
Merged

1523 bye bye 5986 #2336

merged 12 commits into from
Dec 2, 2019

Conversation

rnewson
Copy link
Member

@rnewson rnewson commented Nov 26, 2019

Overview

This PR enhances the _node endpoint in two ways;

  1. The _system, _stats, and _restart endpoints on port 5984 which only affect the local node are now available under _node.
  2. The full internal interface reachable on port 5986 is available under _node. This is achieved by sending the http response of the remote node over erlang rpc.

Testing recommendations

Try;

curl 'foo:bar@localhost:15984/_node/[email protected]/_stats'
curl 'foo:bar@localhost:15984/_node/[email protected]/_system'
curl 'foo:bar@localhost:15984/_node/[email protected]/_restart'
curl 'foo:bar@localhost:15984/_node/[email protected]/_all_dbs'
curl 'foo:bar@localhost:15984/_node/[email protected]/_uuids'
curl 'foo:bar@localhost:15984/_node/[email protected]/_config'
curl 'foo:bar@localhost:15984/_node/[email protected]/_nodes/_changes?include_docs=true

Related Issues or Pull Requests

#1523

Checklist

@rnewson rnewson changed the title 1523 bye bye 5986 rnewson 4 1523 bye bye 5986 Nov 26, 2019
@rnewson rnewson force-pushed the 1523-bye-bye-5986-rnewson-4 branch 5 times, most recently from c1d5af7 to 1fd496b Compare November 28, 2019 17:04
@rnewson rnewson force-pushed the 1523-bye-bye-5986-rnewson-4 branch 2 times, most recently from 3b2b20a to e855959 Compare December 1, 2019 21:44
Copy link
Member

@davisp davisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressively clever. +1

The only thing I'm wondering though is whether we can't remove the _config/_stats/_restart specializations in chttpd_node.erl. Though I didn't look hard enough to see how different those implementations are from what's in the older couch_httpd_* handlers.

src/chttpd/src/chttpd_node.erl Show resolved Hide resolved
@rnewson rnewson merged commit 08a9a5f into master Dec 2, 2019
@rnewson rnewson deleted the 1523-bye-bye-5986-rnewson-4 branch December 2, 2019 19:15
@willholley
Copy link
Member

Thinking ahead to the 3.x release, Is there any documentation update needed to go with this?

It looks as though there is a new option under httpd.enabled - does that mean it's now possible to disable HTTP and enable HTTPS only?

Are we still maintaining the distinct [chttpd] and [httpd] config sections? Perhaps there's an opportunity to sanitize those for 3.x as the split seems a bit redundant if 5986 is gone.

@wohali
Copy link
Member

wohali commented Dec 4, 2019

@rnewson @willholley we need to remove couchup and the documentation for it per #2324 and this PR, unless couchup can be rewritten to work with the new _node interface soon enough - which it might be. But if we're going to say 1.x -> 3.x is forbidden, then we should just say that and drop couchup entirely.

@janl janl mentioned this pull request Jan 5, 2020
5 tasks
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.

None yet

4 participants