-
Notifications
You must be signed in to change notification settings - Fork 2k
Add AllocIPv6 option to allow IPv6 address being used for service registration #25632
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @42wim! It looks like if we pull in the fix in #25997 we only ever need this for dual-stack network interfaces. For IPv6-only we'll automatically advertise the IPv6 address.
We were having a discussion about whether it might make sense to have better default behavior in the dual-stack case and default to IPv6 there. But it doesn't look like there's a good way to do that in a backwards-compatible way.
In any case, I'm 👍 on this general approach. You'll want to include a changelog entry (make cl
), tests, and documentation updates as well.
@@ -134,7 +134,7 @@ func GetAddress( | |||
|
|||
return driverNet.IP, port, nil | |||
|
|||
case structs.AddressModeAlloc: | |||
case structs.AddressModeAlloc, structs.AddressModeAllocAdvertiseIPv6: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing error messages below all refer to address_mode = "alloc"
and we're adding a bunch of conditionals here for the IPv6 mode. I think these want to be different cases and maybe there's some helper functions we can factor out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a helper function getAddressPort
I've added the changelog, tests and documentation update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the docs. I left a tiny suggestion so that the alloc_ipv6
definitions match.
Co-authored-by: Aimee Ukasick <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Fixes #25627 by adding an extra
alloc_advertise_ipv6
option similar to theAdvertiseIPv6Addr
with the docker driver config. Seems the simplest way to fix this?I'll finish the contributor checklist if I get a green light about this PR.
Links
See #25627
Contributor Checklist
changelog entry using the
make cl
command.ensure regressions will be caught.
and job configuration, please update the Nomad website documentation to reflect this. Refer to
the website README for docs guidelines. Please also consider whether the
change requires notes within the upgrade guide.
Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.