planetscale / planetscale/vitess-operator
VTAdmin fails on IPv6-only clusters
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 372
- Forks
- 102
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 15
Description
VTAdmin fails to connect to vtctld on IPv6-only Kubernetes clusters due to improper address formatting.
Error:
W1219 23:35:57.273443 1 component.go:39] [core] [Channel #1 SubChannel #3]
grpc: addrConn.createTransport failed to connect to {
Addr: "fd01:10:100:1a01::c0f0:15999",
ServerName: "",
}. Err: connection error: desc = "transport: Error while dialing: dial tcp: address fd01:10:100:1a01::c0f0:15999: too many colons in address"
Root Cause:
The discovery config uses simple string formatting:
"hostname": "%s:%d"
With an IPv6 ClusterIP and port, this produces:
fd01:10:100:1a01::c0f0:15999
Expected Behavior:
IPv6 addresses must be bracketed per RFC 2732:
[fd01:10:100:1a01::c0f0]:15999
Suggested Fix:
Use net.JoinHostPort() which handles both IPv4 and IPv6 correctly:
"hostname": net.JoinHostPort(vtctldServiceIP, strconv.Itoa(vtctldServiceGrpcPort))
Environment:
- Kubernetes: IPv6-only (single-stack)
- Operator image:
planetscale/vitess-operator:latest - Digest:
sha256:459c3570105bb7fa986b6049b733833def40aa47bc787d83d3f656d9082f9737
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pkg/controller/vitesscluster/reconcile_vtadmin.go around lines 289-303, where the VTAdmin discovery hostname is assembled. Verify the address construction for IPv4 and IPv6 service IPs, then confirm the resulting configuration uses bracketed IPv6 host-port syntax and allows VTAdmin to connect on IPv6-only Kubernetes clusters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cloud, networking
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100