-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(dev/run
): complete Erlang cookie configuration
#5531
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
Merged
pgj
merged 1 commit into
apache:main
from
pgj:fix/dev/run/complete-erlang-cookie-support
May 6, 2025
Merged
fix(dev/run
): complete Erlang cookie configuration
#5531
pgj
merged 1 commit into
apache:main
from
pgj:fix/dev/run/complete-erlang-cookie-support
May 6, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
big-r81
approved these changes
May 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Thx! 🙏
9640cf9
to
d023121
Compare
Please hold merging this until we tag the 3.5.0 release |
Thanks for holding! 3.5.0 was tagged and a few release housekeeping PRs merged, main is open again |
The `--erlang-cookie` configuration flag for the `dev/run` script does not propagate the cookie value for `vm.args` so that the nodes will not have it configured on starting up. That is why, for example, pinging the Clouseau nodes with user-provided cookie will not work, as well as Clouseau nodes will not be able to connect even though they picked up the right value already. Add the missing parts to tweak `vm.args` accordingly and make the Erlang cookie configurable through the `Makefile` too.
d023121
to
13471f2
Compare
jiahuili430
added a commit
that referenced
this pull request
May 12, 2025
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 its flexibility. Related PR: #5531
jiahuili430
added a commit
that referenced
this pull request
May 12, 2025
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: #5531
jiahuili430
added a commit
that referenced
this pull request
May 12, 2025
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: #5531
5 tasks
jaydoane
pushed a commit
to cloudant-labs/clouseau
that referenced
this pull request
Jun 7, 2025
One must be careful with setting the `cookie` value for the application, because after the naming the JAR file, it expects one listing the parameters for the application itself. Hence any overrides to the configuration must be provided before that. That is, in case of the Erlang cookie: ```console $ java -Dcookie=COOKIE -jar jarfile.jar ``` Also, CouchDB upstream has recently gained full support for passing around the Erlang cookie [1], so leverage that here too. [1] apache/couchdb#5531
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
--erlang-cookie
configuration flag for thedev/run
script does not propagate the cookie value forvm.args
so that the nodes will not have it configured on starting up. That is why, for example, pinging the Clouseau nodes with user-provided cookie will not work, as well as Clouseau nodes will not be able to connect even though they picked up the right value already.Add the missing parts to tweak
vm.args
accordingly and make the Erlang cookie configurable through theMakefile
too.Testing recommendations
There are different ways to see if the change is working. For example, one could launch
dev/run
directly to start the nodes with a specific Erlang cookie:Then one should be able to see the cookie configured in
dev/lib/node1/etc/vm.args
:The same could be done with involving Clouseau (assuming that it has been configured):
Then, besides
vm.args
being adjusted (as show above), Clouseau should be run with the respectiveclouseau.cookie
parameter:In addition to these, tests should just work with the
ERLANG_COOKIE
parameter set when runningmake
, for example, with and without Clouseau configured: