Skip to content
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

RabbitMQ 3.13.0 nodes with peer discovery enabled fails to start in an IPv6-only environment #10728

Closed
mnasiadka opened this issue Mar 13, 2024 · 24 comments · Fixed by #10759 or #10904
Closed
Assignees
Labels
Milestone

Comments

@mnasiadka
Copy link

Describe the bug

In OpenStack Kolla-Ansible we support ipv6-only OpenStack deployments, including RabbitMQ.
The following config worked up until RMQ 3.13:

https://8dff850f95026878e224-be64ab2c1211c8399b7ac2efe4751a63.ssl.cf2.rackcdn.com/911094/2/check/kolla-ansible-rocky9-multinode-ipv6/4952d5c/primary/logs/kolla_configs/rabbitmq/rabbitmq.conf

https://8dff850f95026878e224-be64ab2c1211c8399b7ac2efe4751a63.ssl.cf2.rackcdn.com/911094/2/check/kolla-ansible-rocky9-multinode-ipv6/4952d5c/primary/logs/kolla_configs/rabbitmq/index.html

Logs and crash dump here: https://8dff850f95026878e224-be64ab2c1211c8399b7ac2efe4751a63.ssl.cf2.rackcdn.com/911094/2/check/kolla-ansible-rocky9-multinode-ipv6/4952d5c/primary/logs/kolla/rabbitmq/index.html

Reproduction steps

  1. Use config from description to start RMQ 3.13

...

Expected behavior

Runs correctly

Additional context

No response

@mnasiadka mnasiadka added the bug label Mar 13, 2024
@dumbbell dumbbell self-assigned this Mar 13, 2024
@dumbbell
Copy link
Member

Hi! Thank you for the report.

How do you specify the path to the inetrc file?

The peer discovery subsystem starts a temporary intermediate node to query some properties of remote nodes. I suspect that this temporary node doesn't use this inetrc file.

@dumbbell
Copy link
Member

No, this is a limitation in the way that temporary node is started probably. I will try to reproduce locally.

@lukebakken
Copy link
Collaborator

I suspect that this temporary node doesn't use this inetrc file

I'm sure you're right @dumbbell

@michaelklishin michaelklishin modified the milestone: 3.13.2 Mar 13, 2024
@michaelklishin
Copy link
Member

This may be worth delaying 3.13.1 over.

@michaelklishin michaelklishin changed the title rabbitmq 3.13 crashing with ipv6 only config 3.13.0 nodes cannot start in an IPv6-only environment Mar 13, 2024
openstack-mirroring pushed a commit to openstack/kolla-ansible that referenced this issue Mar 14, 2024
Currently RMQ 3.13 fails on ipv6 multinode scenario, use 3.12 from 2023.1
until [1] gets resolved.

[1]: rabbitmq/rabbitmq-server#10728

Change-Id: If11710e99cf2e340e558d68e2071c1bb16825e55
openstack-mirroring pushed a commit to openstack/openstack that referenced this issue Mar 14, 2024
* Update kolla-ansible from branch 'master'
  to f65e4257dd8574c31b0a2a451f4a254e8f273160
  - Merge "CI: Use 2023.2 image for rabbitmq on ipv6 scenario"
  - CI: Use 2023.2 image for rabbitmq on ipv6 scenario
    
    Currently RMQ 3.13 fails on ipv6 multinode scenario, use 3.12 from 2023.1
    until [1] gets resolved.
    
    [1]: rabbitmq/rabbitmq-server#10728
    
    Change-Id: If11710e99cf2e340e558d68e2071c1bb16825e55
@dumbbell
Copy link
Member

dumbbell commented Mar 15, 2024

I'm starting to look at this issue today, bu I can't find where this /etc/rabbitmq/erl_inetrc file is configured. RabbitMQ itself doesn't look at a default location, so it must come from something outside of RabbitMQ.

Could you please share the output of the following two commands?

  • rabbitmqctl eval 'os:getenv().'
  • rabbitmqctl eval 'application:get_all_env(kernel).'

@artificial-intelligence

we set this via the environment, see the jinja template here: https://github.com/openstack/kolla-ansible/blob/master/ansible/roles/rabbitmq/templates/rabbitmq-env.conf.j2 (line 10)

I don't currently have shell access to the CI env where this fails, but as you can see from the git history this part of the code didn't change since 2019, so here are the commands you wanted the output from, from a similar environment, but with a slightly older rmq release.
you can see the erl_inetrc is loaded there as well, I just edited out some stuff like hostnames and IPs:

rabbitmqctl eval 'os:getenv().'
["KOLLA_DISTRO_PYTHON_VERSION=3.10",
 "RABBITMQ_CLUSTER_COOKIE=REDACTED",
 "RABBITMQ_LOG_DIR=/var/log/kolla/rabbitmq","ROOTDIR=/usr/lib/erlang",
 "SHLVL=0","SYS_PREFIX=","RABBITMQ_NODENAME=rabbit@REDACTED",
 "RABBITMQ_PID_FILE=/var/lib/rabbitmq/mnesia/rabbitmq.pid",
 "RABBITMQ_HOME=/usr/lib/rabbitmq/plugins:/usr/lib/rabbitmq/lib/rabbitmq_server-3.11.23",
 "RABBITMQ_LOG_BASE=/var/log/kolla/rabbitmq","RABBITMQ_DIST_PORT=25672",
 "OLDPWD=/","PROGNAME=erl","PWD=/var/lib/rabbitmq",
 "PATH=/usr/lib/erlang/erts-13.2.2.3/bin:/usr/lib/erlang/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
 "PLUGINS_DIR=/usr/lib/rabbitmq/plugins:/usr/lib/rabbitmq/lib/rabbitmq_server-3.11.23/plugins",
 "LANG=en_US.UTF-8","MNESIA_BASE=/var/lib/rabbitmq/mnesia",
 "KOLLA_SERVICE_NAME=rabbitmq","HOME=/var/lib/rabbitmq",
 "KOLLA_BASE_DISTRO=ubuntu","KOLLA_CONFIG_STRATEGY=COPY_ALWAYS",
 "HOSTNAME=REDACTED","KOLLA_BASE_ARCH=x86_64","ERL_EPMD_ADDRESS=REDACTED",
 "ERL_INETRC=/etc/rabbitmq/erl_inetrc","ERL_MAX_ETS_TABLES=50000",
 "ERL_MAX_PORTS=65536",
 "ERL_LIBS=/usr/lib/rabbitmq/lib/rabbitmq_server-3.11.23/plugins",
 "ERL_EPMD_PORT=4369","DEBIAN_FRONTEND=noninteractive",
 "ENABLED_PLUGINS_FILE=/etc/rabbitmq/enabled_plugins",
 "ERL_CRASH_DUMP=/var/log/kolla/rabbitmq/erl_crash.dump","EMU=beam",
 "BINDIR=/usr/lib/erlang/erts-13.2.2.3/bin",
 "CONFIG_FILE=/etc/rabbitmq/rabbitmq",
 "ADVANCED_CONFIG_FILE=/etc/rabbitmq/advanced.config"]

and the other command (your command missed a ' at the end):

 rabbitmqctl eval 'application:get_all_env(kernel).'
[{shell_docs_ansi,auto},
 {net_ticktime,60},
 {shutdown_func,{rabbit_prelaunch,shutdown_func}},
 {inet_default_connect_options,[{nodelay,true}]},
 {connect_all,true},
 {logger_level,notice},
 {inet_dist_listen_min,25672},
 {inetrc,'/etc/rabbitmq/erl_inetrc'},
 {logger_sasl_compatible,false},
 {logger,
     [{handler,default,logger_std_h,
          #{config => #{type => standard_io},
            formatter =>
                {logger_formatter,
                    #{legacy_header => true,single_line => false}}}}]},
 {inet_dist_listen_max,25672},
 {inet_dist_use_interface,{REDACTED}},
 {net_tickintensity,4},
 {prevent_overlapping_partitions,false}]

HTH in the debugging process.

@dumbbell
Copy link
Member

Thank you very much! Yes, it definitely helps.

I fixed the command in my comment, thanks.

@dumbbell
Copy link
Member

As a side question, why do you set both $ERL_INETRC and -kernel inetrc …?

This won’t change the debuggint or fix anything, I’m just curious.

dumbbell added a commit that referenced this issue Mar 16, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
@dumbbell
Copy link
Member

@mnasiadka, @artificial-intelligence: I prepared a patch in pull request #10759. I’m not sure yet how to create a testcase for this. Could you please give it a try in your environment?

dumbbell added a commit that referenced this issue Mar 16, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
@dumbbell dumbbell changed the title 3.13.0 nodes cannot start in an IPv6-only environment RabbitMQ 3.13.0 nodes with peer discovery enabled cannot start in an IPv6-only environment Mar 16, 2024
@dumbbell dumbbell changed the title RabbitMQ 3.13.0 nodes with peer discovery enabled cannot start in an IPv6-only environment RabbitMQ 3.13.0 nodes with peer discovery enabled fails to start in an IPv6-only environment Mar 16, 2024
dumbbell added a commit that referenced this issue Mar 19, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
dumbbell added a commit that referenced this issue Mar 19, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
lukebakken pushed a commit that referenced this issue Mar 20, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
@mnasiadka
Copy link
Author

@dumbbell I'm afraid we have no experience in building a package with that PR content - is there an option you would make an rpm or deb package available for testing?
Sorry for the delayed response.

dumbbell added a commit that referenced this issue Mar 21, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
@dumbbell
Copy link
Member

@mnasiadka: Sure. I took a shortcut and replaced the rabbit_peer_discovery.beam module inside the RabbitMQ 3.13.0 Debian package :-) This is the only module modified in this patch, so I expect it to work. Here it is:

https://people.freebsd.org/~dumbbell/rabbitmq/rabbitmq-server_3.13.0-1_all.deb

lukebakken pushed a commit that referenced this issue Mar 21, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
lukebakken pushed a commit that referenced this issue Mar 21, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
@dormanze
Copy link

I used the new ported code and it didn't solve my problem. The error message is as follows:

2024-03-26 13:47:31.437298+08:00 [notice] <0.44.0> Application mnesia exited with reason: stopped
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0> BOOT FAILED
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0> ===========
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0> Exception during startup:
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0> error:{case_clause,{ok,'/usr/local/rabbitmq_server-3.13.0/etc/rabbitmq/erl_inetrc'}}
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_peer_discovery:maybe_add_inetrc_arguments/1, line 442
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_peer_discovery:query_node_props/1, line 392
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_peer_discovery:sync_desired_cluster/3, line 188
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_db:init/0, line 65
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_boot_steps:-run_step/2-lc$^0/1-0-/2, line 51
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_boot_steps:run_step/2, line 58
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_boot_steps:-run_boot_steps/1-lc$^0/1-0-/1, line 22
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>     rabbit_boot_steps:run_boot_steps/1, line 23
2024-03-26 13:47:31.437559+08:00 [error] <0.248.0>
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>   crasher:
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     initial call: application_master:init/4
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     pid: <0.247.0>
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     registered_name: []
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     exception exit: {{case_clause,{ok,'/usr/local/rabbitmq_server-3.13.0/etc/rabbitmq/erl_inetrc'}},
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>                      {rabbit,start,[normal,[]]}}
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>       in function  application_master:init/4 (application_master.erl, line 142)
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     ancestors: [<0.246.0>]
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     message_queue_len: 1
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     messages: [{'EXIT',<0.248.0>,normal}]
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     links: [<0.246.0>,<0.44.0>]
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     dictionary: []
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     trap_exit: true
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     status: running
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     heap_size: 2586
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     stack_size: 28
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>     reductions: 176
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>   neighbours:
2024-03-26 13:47:32.438634+08:00 [error] <0.247.0>
2024-03-26 13:47:32.446210+08:00 [notice] <0.44.0> Application rabbit exited with reason: {{case_clause,{ok,'/usr/local/rabbitmq_server-3.13.0/etc/rabbitmq/erl_inetrc'}},{rabbit,start,[normal,[]]}}

my erl_inetrc:

{inet6, true}.
{file, hosts, "/etc/hosts"}.
{file, resolv, "/etc/resolv.conf"}.

For other configurations, see: #10840

@dumbbell
Copy link
Member

@dormanze: Thank you for testing!

The patch was not ready anyway and should not have been merged. I reverted it and will work on an improved patch.

@dumbbell dumbbell reopened this Mar 26, 2024
@dormanze
Copy link

@dumbbell Thank you for your reply. Please let me know if you need me to cooperate with uploading any configuration.

michaelklishin pushed a commit that referenced this issue Mar 27, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
@dumbbell dumbbell removed this from the 3.13.1 milestone Mar 28, 2024
@dormanze
Copy link

Hi @dumbbell , any progress on this issue? We desperately need to adapt to 3.13. If there is a fix, please let me know in time to cooperate with the verification. Thank you very much.

@michaelklishin
Copy link
Member

michaelklishin commented Mar 29, 2024

@dormanze it's incredibly rude to nudge open source maintainers to hurry up to deliver a fix in a tool you very likely do not pay for, and never have. We have a PR ready but it has shown an improvement only in some environments.

If you are desperately in need of a fix, you are welcome to contribute it, pay for commercial support, or patiently wait for the maintainers to do it.

@michaelklishin michaelklishin added this to the 3.13.2 milestone Mar 29, 2024
dumbbell added a commit that referenced this issue Mar 29, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
@dumbbell
Copy link
Member

@dormanze: The bug fix is probably ok, but I'm still working on the testsuite to have more confidence. It is challenging to test the part of peer discovery that triggered the regression @mnasiadka and you hit. The current test I have for IPv6 looks good, but having the equivalent for TLS inter-node communication is slightly harder to get right.

Your specific error is interesting. You used single quotes to quote the inetrc filename. Erlang uses this quoting for a type that is not a string. We could tell you to use double quotes and be done with it. But I think RabbitMQ should handle the use of single quotes from users likely used to Bourne shell quoting and do what’s needed internally to use the parameter as a filename. I’m considering this in the testsuite.

@dormanze
Copy link

dormanze commented Apr 1, 2024

I verified the addition of the double quotes and my problem was indeed solved. Thank you very much.@dumbbell

dumbbell added a commit that referenced this issue Apr 2, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 2, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 4, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 4, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 8, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 8, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 9, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 9, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 9, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 15, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 15, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
dumbbell added a commit that referenced this issue Apr 16, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.
@dumbbell
Copy link
Member

I’ve merged the patch to the main branch and will leave it there for a week or so. If no regressions are spotted, I will backport it to 3.13.x. Sorry for the time it took to merge, there were unrelated failures in CI that blocked it.

If you have a chance, please test the main branch :-)

mergify bot pushed a commit that referenced this issue Apr 25, 2024
[Why]
As shown in #10728, in an IPv6-only environment, `kernel` name
resolution must be configured through an inetrc file.

The temporary hidden node must be configured exactly like the main node
(and all nodes in the cluster in fact) to allow communication. Thus we
must pass the same inetrc file to that temporary hidden node. This
wasn’t the case before this patch.

[How]
We query the main node’s kernel to see if there is any inetrc file set
and we use the same on the temporary hidden node’s command line.

While here, extract the handling of the `proto_dist` module from the TLS
code. This parameter may be used outside of TLS like this IPv6-only
environment.

V2: Accept `inetrc` filenames as atoms, not only lists. `kernel` seems
    to accept them. This makes a better user experience for users used
    to Bourne shell quoting not knowing that single quotes have a
    special meaning in Erlang.

Fixes #10728.

(cherry picked from commit 8425afa)
@dumbbell
Copy link
Member

The patch was integrated into the 3.13.x release branch and will be part of RabbitMQ 3.13.2.

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