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

Add convenience remsh bash script #845

Merged
merged 1 commit into from Sep 28, 2017

Conversation

Projects
None yet
3 participants
@wohali
Member

wohali commented Sep 27, 2017

To make this work, I had to change the default -name from the old
couchdb@localhost to couchdb@127.0.0.1. This matches the advice
we already had in vm.args to use FQDN or IP address, anyway.

Once this merges I'll look at doing a Windows version, if possible.

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

@wohali wohali requested a review from janl Sep 27, 2017

@wohali

This comment has been minimized.

Show comment
Hide comment
@wohali

wohali Sep 27, 2017

Member

Note: I don't know if we actually want to document this just yet. It's for advanced users for now; if they need it, they will have it.

If we add ferd/recon to our dependencies, as we've discussed on and off, then we might include some shortcuts for basic stats gathering to the Troubleshooting section of the documentation.

Member

wohali commented Sep 27, 2017

Note: I don't know if we actually want to document this just yet. It's for advanced users for now; if they need it, they will have it.

If we add ferd/recon to our dependencies, as we've discussed on and off, then we might include some shortcuts for basic stats gathering to the Troubleshooting section of the documentation.

@nickva

nickva approved these changes Sep 28, 2017

Great idea, @wohali !

Worked for me:

$ ./configure --disable-docs --disable-fauxton -c
$ make release
$ ./rel/couchdb/bin/couchdb
(other terminal) $ ./couchdb/bin/remsh
>  couch_debug:opened_files_contains("db").
[{#Port<0.3592>,<0.254.0>,
  {file_descriptor,prim_file,{#Port<0.3592>,42}},
  "./data/_dbs.couch"}]
Show outdated Hide outdated rel/overlay/bin/remsh
set -x
fi
exec "$BINDIR/erl" -boot "$ROOTDIR/releases/$APP_VSN/start_clean" \

This comment has been minimized.

@nickva

nickva Sep 28, 2017

Contributor

Good call on using exec

@nickva

nickva Sep 28, 2017

Contributor

Good call on using exec

Add convenience remsh bash script
To make this work, I had to change the default -name from the old
couchdb@localhost to couchdb@127.0.0.1. This matches the advice
we already had in vm.args to use FQDN or IP address, anyway.

Once this merges I'll look at doing a Windows version, if possible.

@wohali wohali removed the request for review from janl Sep 28, 2017

@wohali wohali merged commit 30fcd7b into master Sep 28, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@wohali wohali deleted the add-remsh branch Sep 28, 2017

@@ -0,0 +1,76 @@
#!/bin/bash

This comment has been minimized.

@janl

janl Sep 28, 2017

Member

Are there any bashisms in this script? https://linux.die.net/man/1/checkbashisms can help.

I’d prefer (but not hard requirement) to restrict to sh syntax, so this works by default on BSD et.al. systems.

@janl

janl Sep 28, 2017

Member

Are there any bashisms in this script? https://linux.die.net/man/1/checkbashisms can help.

I’d prefer (but not hard requirement) to restrict to sh syntax, so this works by default on BSD et.al. systems.

This comment has been minimized.

@wohali

wohali Sep 28, 2017

Member
$ checkbashisms ~/couchdb/rel/overlay/bin/remsh
$ echo $?
0
@wohali

wohali Sep 28, 2017

Member
$ checkbashisms ~/couchdb/rel/overlay/bin/remsh
$ echo $?
0

This comment has been minimized.

@wohali

wohali Sep 28, 2017

Member

Ah, there is a single one if I force it:

$ checkbashisms -n -x -p -f couchdb/rel/overlay/bin/remsh
possible bashism in couchdb/rel/overlay/bin/remsh line 69 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ ! -z "$VERBOSE" ]]; then

I'll PR this up and auto-merge since it's a trivial fix.

@wohali

wohali Sep 28, 2017

Member

Ah, there is a single one if I force it:

$ checkbashisms -n -x -p -f couchdb/rel/overlay/bin/remsh
possible bashism in couchdb/rel/overlay/bin/remsh line 69 (alternative test command ([[ foo ]] should be [ foo ])):
if [[ ! -z "$VERBOSE" ]]; then

I'll PR this up and auto-merge since it's a trivial fix.

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