12730 add remsh script #72

Merged
merged 2 commits into from Oct 13, 2011

Conversation

Projects
None yet
3 participants
@davisp
Owner

davisp commented Oct 12, 2011

The remsh pattern is quite useful for connecting to running nodes for
debugging production issues. This adds a small script that lets users
connect quickly to a running node.

Add a remsh command to BigCouch
The remsh pattern is quite useful for connecting to running nodes for
debugging production issues. This adds a small script that lets users
connect quickly to a running node.
@davisp

This comment has been minimized.

Show comment Hide comment
@davisp

davisp Oct 12, 2011

Owner

I should note the two caveats to this.

The first is that setting the cookie is a bit wonky. I think there might be some love in setting it via ./configure with the default of monster like we have now and including that both places.

The second is that the node name has to be set to match the short/long versions of the node. Ie, the simplest invocation is:

$ ./rel/dev1/bin/remsh davisp@127.0.0.1

Not sure if that's an issue or not.

Owner

davisp commented Oct 12, 2011

I should note the two caveats to this.

The first is that setting the cookie is a bit wonky. I think there might be some love in setting it via ./configure with the default of monster like we have now and including that both places.

The second is that the node name has to be set to match the short/long versions of the node. Ie, the simplest invocation is:

$ ./rel/dev1/bin/remsh davisp@127.0.0.1

Not sure if that's an issue or not.

@bdionne

This comment has been minimized.

Show comment Hide comment
@bdionne

bdionne Oct 12, 2011

the cookie thing is an issue for me. I always use the value in .erlang-cookie when running BigCouch locally.

bdionne commented Oct 12, 2011

the cookie thing is an issue for me. I always use the value in .erlang-cookie when running BigCouch locally.

@davisp

This comment has been minimized.

Show comment Hide comment
@davisp

davisp Oct 12, 2011

Owner

Oh for your shells. @bdionne And -setcookie overrides the .erlang.cookie?

Owner

davisp commented Oct 12, 2011

Oh for your shells. @bdionne And -setcookie overrides the .erlang.cookie?

@kocolosk

This comment has been minimized.

Show comment Hide comment
@kocolosk

kocolosk Oct 12, 2011

Owner

I've been annoyed by the need to supply a name when connecting. Can we get the script to generate a name automatically?

Owner

kocolosk commented Oct 12, 2011

I've been annoyed by the need to supply a name when connecting. Can we get the script to generate a name automatically?

@davisp

This comment has been minimized.

Show comment Hide comment
@davisp

davisp Oct 12, 2011

Owner

@bdionne Cookie support is better. Let me know if it works for you.
@kocolosk No more need for you to specify insightful names like a or aa or even aaaaaaa when using this script.

Owner

davisp commented Oct 12, 2011

@bdionne Cookie support is better. Let me know if it works for you.
@kocolosk No more need for you to specify insightful names like a or aa or even aaaaaaa when using this script.

@kocolosk

View changes

rel/overlay/bin/remsh
+
+COOKIE="{{cookie}}"
+
+echo exec $BINDIR/erl $NAME -remsh $REM_NODE $COOKIE -hidden -boot $START_CLEAN

This comment has been minimized.

Show comment Hide comment
@kocolosk

kocolosk Oct 13, 2011

Owner

If I type ./rel/dev1/bin/remsh it just prints out the exec line. Are you sure you want the echo in here?

@kocolosk

kocolosk Oct 13, 2011

Owner

If I type ./rel/dev1/bin/remsh it just prints out the exec line. Are you sure you want the echo in here?

This comment has been minimized.

Show comment Hide comment
@davisp

davisp Oct 13, 2011

Owner

whoops. Accidentally committed that debug statement. Meant to remove it last night. Fixing now.

@davisp

davisp Oct 13, 2011

Owner

whoops. Accidentally committed that debug statement. Meant to remove it last night. Fixing now.

@kocolosk

This comment has been minimized.

Show comment Hide comment
@kocolosk

kocolosk Oct 13, 2011

Owner

LGTM. Squash the bugfix before merging.

Owner

kocolosk commented Oct 13, 2011

LGTM. Squash the bugfix before merging.

Improve remsh script
Cookies now default to using ~/.erlang.cookie which is automatically
generated if it does not exist when erlang starts with a name.

There is also no longer a need to specify a name to remsh as it'll
generate a name based on the process id and set the short or long
version appropriately.

davisp added a commit that referenced this pull request Oct 13, 2011

Merge pull request #72 from cloudant/12730-add-remsh-script
Add a remsh script for each node

BugzId: 12730

@davisp davisp merged commit 2063aca into master Oct 13, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment