Add AllocIPv6 option to allow IPv6 address being used for service registration#25632
Add AllocIPv6 option to allow IPv6 address being used for service registration#25632tgross merged 8 commits intohashicorp:mainfrom
Conversation
tgross
left a comment
There was a problem hiding this comment.
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.
| return driverNet.IP, port, nil | ||
|
|
||
| case structs.AddressModeAlloc: | ||
| case structs.AddressModeAlloc, structs.AddressModeAllocAdvertiseIPv6: |
There was a problem hiding this comment.
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.
I've added a helper function getAddressPort
|
I've added the changelog, tests and documentation update. |
aimeeu
left a comment
There was a problem hiding this comment.
Thanks for updating the docs. I left a tiny suggestion so that the alloc_ipv6 definitions match.
Co-authored-by: Aimee Ukasick <Aimee.Ukasick@ibm.com>
|
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Description
Fixes #25627 by adding an extra
alloc_advertise_ipv6option similar to theAdvertiseIPv6Addrwith 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 clcommand.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.