Skip to content

1523 bye bye 5986 #2336

Merged
rnewson merged 12 commits intomasterfrom
1523-bye-bye-5986-rnewson-4
Dec 2, 2019
Merged

1523 bye bye 5986 #2336
rnewson merged 12 commits intomasterfrom
1523-bye-bye-5986-rnewson-4

Conversation

@rnewson
Copy link
Copy Markdown
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/node2@127.0.0.1/_stats'
curl 'foo:bar@localhost:15984/_node/node2@127.0.0.1/_system'
curl 'foo:bar@localhost:15984/_node/node2@127.0.0.1/_restart'
curl 'foo:bar@localhost:15984/_node/node2@127.0.0.1/_all_dbs'
curl 'foo:bar@localhost:15984/_node/node2@127.0.0.1/_uuids'
curl 'foo:bar@localhost:15984/_node/node2@127.0.0.1/_config'
curl 'foo:bar@localhost:15984/_node/node2@127.0.0.1/_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 requested review from davisp, janl and wohali November 28, 2019 17:07
@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
Copy Markdown
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.

Comment thread src/chttpd/src/chttpd_node.erl
@rnewson rnewson force-pushed the 1523-bye-bye-5986-rnewson-4 branch from a643bd2 to ba0c203 Compare December 2, 2019 17:51
@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
Copy Markdown
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
Copy Markdown
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.

4 participants