aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates/extended_bin
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2019-04-14 07:21:04 -0600
committerGitHub <[email protected]>2019-04-14 07:21:04 -0600
commit8ff1e44cebf3aee09969a9324c04074ba87f10b9 (patch)
tree6ba516ce5a442a3a49d21d0c9338332073382e38 /priv/templates/extended_bin
parent4825a495febf31f5be172d1a7e9b89a1514f1b5c (diff)
downloadrelx-8ff1e44cebf3aee09969a9324c04074ba87f10b9.tar.gz
relx-8ff1e44cebf3aee09969a9324c04074ba87f10b9.tar.bz2
relx-8ff1e44cebf3aee09969a9324c04074ba87f10b9.zip
add dist name and cookie to ERL_FLAGS for nodetool (#712)v3.31.0
* remove deprecated hex field from .app.src * start nodetool dist node in erl flags
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-xpriv/templates/extended_bin20
1 files changed, 13 insertions, 7 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index cfeb859..a4cba4a 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -189,16 +189,22 @@ relx_gen_id() {
relx_nodetool() {
command="$1"; shift
+ # Generate a unique id used to allow multiple nodetool calls to the
+ # same node transparently
+ nodetool_id="maint$(relx_gen_id)-${NAME}"
+
if [ -z "${START_EPMD}" ]; then
- ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS}" "$ERTS_DIR/bin/escript" \
- "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \
- -setcookie "$COOKIE" "$command" $@
+ ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE}" \
+ "$ERTS_DIR/bin/escript" \
+ "$ROOTDIR/bin/nodetool" \
+ "$NAME_TYPE" "$NAME" \
+ "$command" $@
else
- ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS}" "$ERTS_DIR/bin/escript" \
- "$ROOTDIR/bin/nodetool" "$NAME_TYPE" "$NAME" \
- $START_EPMD -setcookie "$COOKIE" "$command" $@
+ ERL_FLAGS="${ERL_FLAGS} ${MAYBE_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE}" \
+ "$ERTS_DIR/bin/escript" \
+ "$ROOTDIR/bin/nodetool" \
+ $START_EPMD "$NAME_TYPE" "$NAME" "$command" $@
fi
-
}
# Run an escript in the node's environment