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

mon: fix bind addr when IPv6 and msgr2 are enabled (backport #14248) #14261

Merged
merged 1 commit into from
May 23, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 23, 2024

When IPv6-only network mode is enabled and when mons are configured to listen only on msgrV2 port, Rook has to add the port to the mon --public-bind-addr in order to force mons to stop listening on the msgrV1 port. This can cause problems for IPv6 clusters where adding ':' to the end of an IP addr looks like a valid IPv6 address.

In IPv6 mode, Rook needs to set this to [<ip>]:<port> with the brackets to be a non-ambiguous IPv6 address.

In IPv4 mode, Rook needs to keep its existing behavior. IPv4 mode should also continue to be the defualt assumption if the network config isn't specified.

If dualStack: true is specified, Rook is informed that the environment is dual stack, but Rook doesn't know which IP family to expect from the pod IP. In this scenario, it is safest for Rook not to apply the port, since assuming either IPv4 or IPv6 format could be incorrect. In this scenario, mons may still listen on msgrV1 ports, but this is preferable to an environment where mons perpetually crash.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

This is an automatic backport of pull request #14248 done by [Mergify](https://mergify.com).

When IPv6-only network mode is enabled and when mons are configured to
listen only on msgrV2 port, Rook has to add the port to the mon
--public-bind-addr in order to force mons to stop listening on the
msgrV1 port. This can cause problems for IPv6 clusters where adding
':<port>' to the end of an IP addr looks like a valid IPv6 address.

In IPv6 mode, Rook needs to set this to '[<ip>]:<port>' with the
brackets to be a non-ambiguous IPv6 address.

In IPv4 mode, Rook needs to keep its existing behavior. IPv4 mode should
also continue to be the defualt assumption if the network config isn't
specified.

If 'dualStack: true' is specified, Rook is informed that the environment
is dual stack, but Rook doesn't know which IP family to expect from the
pod IP. In this scenario, it is safest for Rook not to apply the port,
since assuming either IPv4 or IPv6 format could be incorrect. In this
scenario, mons may still listen on msgrV1 ports, but this is preferable
to an environment where mons perpetually crash.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
(cherry picked from commit 573a47e)
@BlaineEXE BlaineEXE merged commit e38c36f into release-1.14 May 23, 2024
52 of 53 checks passed
@BlaineEXE BlaineEXE deleted the mergify/bp/release-1.14/pr-14248 branch May 23, 2024 17:16
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.

None yet

1 participant