couchdb
couchdb copied to clipboard
Extend `remsh` to read cookie from various sources
Overview
We can set cookies using ./dev/run --erlang-cookie=crumbles or vm.args: -setcookie crumbles.
If neither of them is set or we set the cookie in both places, then the Erlang node will read the cookie from ~/.erlang.cookie.
Add this mechanism to the remsh script to extend flexibility.
Related PR: https://github.com/apache/couchdb/pull/5531
Testing recommendations
# After the change it should pass
./dev/run --admin=adm:pass -n 1 --erlang-cookie=crumbles --no-eval 'dev/remsh'
Related Issues or Pull Requests
Checklist
- [ ] Code is written and works correctly
- [ ] Changes are covered by tests
- [ ] Any new configurable parameters are documented in
rel/overlay/etc/default.ini - [ ] Documentation changes were made in the
src/docsfolder - [ ] Documentation changes were backported (separated PR) to affected branches
Thanks for looking into it, but wouldn't it be better to maintain only one remsh` script, which can be used for 'dev' and 'prod'?