apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.26k stars 1.03k forks source link

remsh should guess -name and -cookie on Windows #2176

Open wohali opened 5 years ago

wohali commented 5 years ago

Summary

remsh could easily be enhanced to guess at the correct value for the node name and Erlang cookie, for the CouchDB running on the current host.

Desired Behaviour

Type remsh on a machine that's running CouchDB, and it should automatically self-configure so that it can connect to the locally running node.

Possible Solution

Use grep (or a similar Windows function) to search the vm.args file for the -name and -cookie arguments. Use those as default parameters, if alternatives have not been specified on the remsh command line.

Additional context

Operator happy fingers are important. Being able to type remsh on a machine and immediately be at the Erlang REPL is super valuable.

ghost commented 5 years ago

Can I try this out?

wohali commented 4 years ago

@abyss143 Any open issue is available for someone to work on. Feel free to submit a PR!

iilyak commented 4 years ago

AFAIK we do it already here https://github.com/apache/couchdb/blob/master/rel/overlay/bin/remsh#L41

wohali commented 4 years ago

@iilyak that's only cookie, not name, but could you look at #2738 ?

wohali commented 4 years ago

OK, this is now done for *nix platforms thanks to #2738 . We still need it for Windows.