Files
nomad/.changelog/24649.txt
Tim Gross 30e57c39b0 discovery: correctly handle IPv6 addresses from go-discover (#24649)
Nomad sets a default port when resolving server addresses that don't have
one. When we get a "bare" IPv6 address without a port, we end up with an
unexpected error "too many colons in address" when we try to split the address
and host, because the standard library function expects IPv6 addresses to be
wrapped in brackets as recommended by RFC5952. User-configured addresses avoid
this problem by accepting IP address and port as separate configuration values,
but go-discover emits "bare" IPv6 addresses without a port in IPv6 environments.

Fix this by adding brackets to IPv6 addresses when we get the "too many colons"
error from the stdlib. This will still give erroneous results if the address
includes the port but is missing brackets, but there's no way to unambiguously
parse that address.

Ref: https://www.rfc-editor.org/rfc/rfc5952
Fixes: https://github.com/hashicorp/nomad/issues/24608
2024-12-17 15:49:40 -05:00

4 lines
110 B
Plaintext

```release-note:bug
discovery: Fixed a bug where IPv6 addresses would not be accepted from cloud autojoin
```