-
Notifications
You must be signed in to change notification settings - Fork 88
Description
➜ kubectl -n vitess logs kiwi-zone1-vtadmin-406d5688-76ff574f6f-qxhd6 -c vtadmin-api
...
W1219 23:35:57.273445 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"
Bug: The discovery config uses simple string formatting:
"hostname": "%s:%d"
With vtctldServiceIP (the ClusterIP) and port, producing:
fd01:10:100:1a01::c0f0:15999
Fix: Should use net.JoinHostPort() which properly brackets IPv6:
"hostname": net.JoinHostPort(vtctldServiceIP, strconv.Itoa(vtctldServiceGrpcPort))
This would produce the correct format:
[fd01:10:100:1a01::c0f0]:15999
vitess-operator/pkg/controller/vitesscluster/reconcile_vtadmin.go
Lines 289 to 303 in 839329a
| "vtctlds": [ | |
| { | |
| "host": { | |
| "fqdn": "%s:%d", | |
| "hostname": "%s:%d" | |
| } | |
| } | |
| ], | |
| "vtgates": [ | |
| { | |
| "host": { | |
| "hostname": "%s:%d" | |
| } | |
| } | |
| ] |
Not sure exactly which version I'm using, but this is the image digest which appears to be latest as of today:
https://hub.docker.com/layers/planetscale/vitess-operator/latest/images/sha256-459c3570105bb7fa986b6049b733833def40aa47bc787d83d3f656d9082f9737