-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Introduce ad-hoc Erlang cookie configuration for the dev
scripts
#4445
base: main
Are you sure you want to change the base?
Conversation
Extend the `dev/run` and `dev/remsh` scripts in ways that would let the users to set the cookie for inter-node communication directly from the command line. This may come handy in certain cases, e.g. when there is a specific Clouseau instance to hook up.
432f154
to
b6540b6
Compare
@@ -38,8 +38,7 @@ | |||
{{node_name}} | |||
|
|||
# All nodes must share the same magic cookie for distributed Erlang to work. | |||
# Uncomment the following line and append a securely generated random value. | |||
# -setcookie | |||
{{erlang_cookie}} |
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.
Hi,
can this change break "couchdb-pkg" somewhere, if we are maybe grepping for "-setcookie"? @rnewson
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.
I have not worked with couchdb-pkg
before but I can verify this concern there.
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.
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.
Thanks @jan for the references.
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.
The package scripts should be (needs to be) robust against this kind of thing and I believe they are.
If the commented-out setcookie line is no longer present after this change the packaging scripts will append a setcookie line to the end of the file. That's less tidy than it being where we planned for it to be, but it will still work.
I would, however, prefer for this change not to have unintended side-effects at all.
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.
Agreed.
if [ -n "$COOKIE" ]; then | ||
_cookie_flag="-setcookie $COOKIE" | ||
else | ||
_cookie_flag="" |
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.
any reason for the else clause when empty is the default?
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.
No, there is not any :-) Thanks for catching this.
Extend the
dev/run
anddev/remsh
scripts in ways that would let the users to set the cookie for inter-node communication directly from the command line. This may come handy in certain cases, e.g. when there is a specific Clouseau instance to hook up.