couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Extend `remsh` to read cookie from various sources

Open jiahuili430 opened this issue 7 months ago • 1 comments

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/docs folder
  • [ ] Documentation changes were backported (separated PR) to affected branches

jiahuili430 avatar May 12 '25 16:05 jiahuili430

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'?

big-r81 avatar May 16 '25 14:05 big-r81