Skip to content

Commit

Permalink
Also set -dist_listen false for relx_nodetool calls
Browse files Browse the repository at this point in the history
When ERL_DIST_PORT is set nodetool will fail if the port is in use by the
target process, in particular ping will fail, so any commands using
ping_or_exit with also fail. Setting -dist_listen false is consistent with
relx_get_nodename and relx_rem_sh
  • Loading branch information
GlenWalker committed Jul 19, 2022
1 parent b5182ce commit 207ce2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions priv/templates/extended_bin
Original file line number Diff line number Diff line change
Expand Up @@ -388,14 +388,14 @@ relx_nodetool() {
nodetool_id="maint$(relx_gen_id)-${NAME}"

if [ -z "${START_EPMD}" ]; then
ERL_FLAGS="${ERL_FLAGS} ${DIST_ARGS} ${EXTRA_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE}" \
ERL_FLAGS="${ERL_FLAGS} ${DIST_ARGS} ${EXTRA_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE} -dist_listen false" \
"$ERTS_DIR/bin/escript" \
"$ROOTDIR/bin/nodetool" \
"$NAME_TYPE" "$NAME" \
"$command" "$@"
else
# shellcheck disable=SC2086
ERL_FLAGS="${ERL_FLAGS} ${DIST_ARGS} ${EXTRA_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE}" \
ERL_FLAGS="${ERL_FLAGS} ${DIST_ARGS} ${EXTRA_DIST_ARGS} ${NAME_TYPE} $nodetool_id -setcookie ${COOKIE} -dist_listen false" \
"$ERTS_DIR/bin/escript" \
"$ROOTDIR/bin/nodetool" \
$START_EPMD "$NAME_TYPE" "$NAME" "$command" "$@"
Expand Down

0 comments on commit 207ce2b

Please sign in to comment.