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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IPv6 clustering options configurable #11734

Merged
merged 7 commits into from Oct 10, 2023

Conversation

zmstone
Copy link
Member

@zmstone zmstone commented Oct 9, 2023

Fixes #11715
Jira: EMQX-11107
Release v/e5.3.1

Tried my best to test IPv6 in docker (also added to a commonly used clustering script),
however, I do not have a IPv6-ONLY environment to verify the newly if rpc.ipv6_only must be set to true for it to work properly.

Worth noting that the clustering configs in general are not quite upgrade friendly.
For example, when changing from tcp to tls, rolling upgrade will not work.

Nonetheless, I tried my best to support rpc.listen_address change from a IPv4 to a IPv6 address in a rolling upgrade.
However, I did not verify rolling upgrade for cluster.proto_dist from inet_tcp to inet6_tcp is supported.

Summary

馃 Generated by Copilot at ffebcd1

This pull request adds IPv6 support for the cluster and RPC features of EMQX, updates the dependencies and i18n files, and improves the build and test scripts. It modifies the emqx_conf_schema.erl, emqx_rule_funcs.erl, build, rel/i18n/emqx_conf_schema.hocon, scripts/test/start-two-nodes-in-docker.sh, .ci/docker-compose-file/pgsql/Dockerfile, apps/emqx/rebar.config, and mix.exs files.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Added property-based tests for code which performs user input validation
  • Changed lines covered in coverage report
  • Change log has been added to changes/(ce|ee)/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • Created PR to emqx-docs if documentation update is required, or link to a follow-up jira ticket
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

So it can work with older version docker buildkit
Made possible to configure inet6_tls for Erlang distribution
Also, added support to configure ipv6 listener for gen_rpc
* ekka 0.15.16 supports 'inet6_tls' as ekka.proto_dist
* gen_rpc 3.2.0 supports true | false as gen_rpc.ipv6_only
@zmstone zmstone force-pushed the 1002-support-ipv6-only-clustering branch from 5ceb2ee to bc3a57e Compare October 9, 2023 18:06
@zmstone zmstone changed the base branch from master to release-53 October 9, 2023 18:06
@zmstone zmstone force-pushed the 1002-support-ipv6-only-clustering branch from bc3a57e to d2af649 Compare October 9, 2023 18:12
@zmstone zmstone force-pushed the 1002-support-ipv6-only-clustering branch from d2af649 to d651764 Compare October 10, 2023 08:05
sc(
string(),
#{
default => "0.0.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we need to do some address check if ipv6_only is true while listen_address is v4.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chose to document the behaviour in desc:
ipv6_only only takes effect if listen_address is configured with a v6 address.

@zmstone zmstone merged commit 0a9e1df into emqx:release-53 Oct 10, 2023
140 checks passed
@zmstone zmstone deleted the 1002-support-ipv6-only-clustering branch October 10, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support to listen IPv6 address of port 5370
2 participants