Dragonfly2
Dragonfly2 copied to clipboard
Wrong parsing of IPv6 address in dfdaemon
Bug report:
grpclog/grpclog.go:37 [core][Channel #683] Channel created
grpclog/grpclog.go:37 [core][Channel #683] original dial target is: "[fd01:0:0:2::52eb]:8002"
grpclog/grpclog.go:37 [core][Channel #683] dial target "[fd01:0:0:2::52eb]:8002" parse failed: parse "[fd01:0:0:2::52eb]:8002": first path segment in URL cannot contain colon
grpclog/grpclog.go:37 [core][Channel #683] fallback to scheme "passthrough"
grpclog/grpclog.go:37 [core][Channel #683] parsed dial target is: {Scheme:passthrough Authority: URL:{Scheme:passthrough Opaque: User: Host: Path:/[fd01:0:0:2::52eb]:8002 RawPath:/[fd01:0:0:2::52eb]:8002 OmitHost:false ForceQuery:false RawQuery: Fragment: RawFragment:}}
grpclog/grpclog.go:37 [core][Channel #683] Channel authority set to "[fd01:0:0:2::52eb]:8002"
Expected behavior:
No error message should be output as the IPv6 address is correctly parsed and only the last colon outside the square brackets is considered a delimiter for the port.
How to reproduce it:
- Run dragonfly in a IPv6 enabled kubernetes cluster
- Enable console output for dfdaemon
- Check the console output for dfdaemon
Environment:
- Dragonfly version: v2.1.0-beta.1
- OS: Raspberry Pi OS (Debian)
- Kernel: 6.1.21-v8+ aarch64 GNU/Linux
- Redis: 7.2-rc2
I have seen this as well with IPv4, the same error message "first path segment in URL cannot contain colon"
@gaius-qi @jim3ma