-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Proposal] Add new erl_epmd:names/2 function #2222
Conversation
With erl_epmd:names/2 it is possible to specify the Family address as: `net_adm:names(localhost,inet6).`. It would help to handle the nodes name resolution when the EPMD is bound to IPV6 port as [1]. 1- #602 (comment)
I created and Vagrant image to help to test the issue.
vagrant up && vagrant ssh
:~> sudo ss -tulpen | grep epmd
tcp LISTEN 0 128 [::1]:4369 [::]:* users:(("epmd",pid=1072,fd=3),("systemd",pid=1,fd=46)) ino:15225 sk:4 v6only:1 <->
:~> erl -sname hello -proto_dist inet6_tcp
Erlang/OTP 21 [erts-10.3.3] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]
Eshell V10.3.3 (abort with ^G)
(hello@node0)1> net_adm:names(localhost).
{error,address}
|
I need to read up some more before deciding, but your approach seems to be good. What I'm wondering is if |
Thank you Lukas, |
If you configure an
Does this solve your problem? It will be complicated to fix to work without setting that option and I'm not sure it actually makes sense to not set it when running ipv6 distro. Can you think of any reason why you would want to resolve ipv4 addresses per default and use ipv6 distro? |
It seems to work, thank you @garazdawi |
I don't know if it needed or not :) What I think would be great is to somewhere document what you need to configure in order to run erlang distribution in an ipv6 environment. |
I'll close this PR for now. If anyone thinks that it is still a good idea feel free to re-open or create a new PR. |
With
erl_epmd:names/2
it is possible to specify the Family addressas:
net_adm:names(localhost,inet6).
.It would help to handle the nodes name resolution when the EPMD is bound
to IPV6 port:
See #602 (comment).
for example:
bin/erl -sname hello -proto_dist inet6_tcp (hello@linux-s1)5> net_adm:names(localhost). {error,address}
with the new function, it is possible to specify the Family address, it would be:
Note:
This is just a proposal, please let me know what you think about if it makes sense I will add the documentation.
Thank you for your attention.