erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
696 stars 233 forks source link

Also set -dist_listen false for relx_nodetool calls #925

Closed GlenWalker closed 1 year ago

GlenWalker commented 2 years ago

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

(Currently attempting to run without epmd on OTP 23.2 based on https://blog.erlware.org/epmdlessless/)

tsloughter commented 2 years ago

@GlenWalker this patch solves your issue? It shouldn't be using nodetool in a case that dist_listen is available since it should instead call erl_call, so I'm confused how this is happening.

tsloughter commented 2 years ago

Are you setting USE_NODETOOL to force nodetool usage?

GlenWalker commented 2 years ago

No, but I am using ERL_DIST_PORT and the patch from #924 (the 2 issues are related but separate, so I made separate PRs)

tsloughter commented 1 year ago

Hm, was about to merge this when I realized it may be more proper to set $nodetool_id to undefined -- https://www.erlang.org/doc/reference_manual/distributed.html#dynamic-node-name

This was only support in OTP-23+ so we weren't doing it before but it'll set dist_listen to false.

We can drop OTP-22 support so that'd be the more correct solution.

tsloughter commented 1 year ago

Eh, there are other places we still do this and can be cleaned up when dropping 22 support, so I'll handle that and merge this as is.

Thanks!