vitessio/vitess · error
GetTablets(cluster = %s): %w
Error message
GetTablets(cluster = %s): %w
What it means
API.GetTablets fans out to every configured cluster and calls c.GetTablets in a goroutine; a per-cluster failure is recorded with this wrapper ("GetTablets(cluster = <ID>): <cause>") on the shared error recorder, failing the overall request if any cluster errors.
Source
Thrown at go/vt/vtadmin/api.go:1509
tablets []*vtadminpb.Tablet
wg sync.WaitGroup
er concurrency.AllErrorRecorder
m sync.Mutex
)
for _, c := range clusters {
if !api.authz.IsAuthorized(ctx, c.ID, rbac.TabletResource, rbac.GetAction) {
continue
}
wg.Add(1)
go func(c *cluster.Cluster) {
defer wg.Done()
ts, err := c.GetTablets(ctx)
if err != nil {
er.RecordError(fmt.Errorf("GetTablets(cluster = %s): %w", c.ID, err))
return
}
m.Lock()
tablets = append(tablets, ts...)
m.Unlock()
}(c)
}
wg.Wait()
if er.HasErrors() {
return nil, er.Error()
}
return &vtadminpb.GetTabletsResponse{
Tablets: tablets,
}, nilView on GitHub (pinned to 01a25a7d17)
Solutions
- Inspect the wrapped cause for the failing cluster ID and root error
- Verify vtctld for that cluster is reachable and its GetTablets works (vtctldclient GetTablets)
- Check topo server health and tablet registration records
- Fix/remove the misconfigured cluster in vtadmin config
Example fix
// before
ts, err := c.GetTablets(ctx)
if err != nil {
er.RecordError(fmt.Errorf("GetTablets(cluster = %s): %w", c.ID, err))
return
}
// after: ensure vtctld + topo healthy for that cluster
ts, err := c.GetTablets(ctx)
if err != nil {
er.RecordError(fmt.Errorf("GetTablets(cluster = %s): %w", c.ID, err))
return
} Defensive patterns
Strategy: try-catch
Validate before calling
// confirm vtctld GetTablets works before vtadmin fan-out
_, err := vtctldClient.GetTablets(ctx, &vtctldatapb.GetTabletsRequest{})
if err != nil {
log.Printf("vtctld tablet discovery broken: %v", err)
} Type guard
func tabletsFailed(er concurrency.AllErrorRecorder) bool { return er.HasErrors() } Try / catch
resp, err := client.GetTablets(ctx, req)
if err != nil {
if strings.Contains(err.Error(), "GetTablets(cluster = ") {
// extract cluster ID; check its vtctld/topo
}
return err
} Prevention
- Ensure tablets are registered in the topo (vttablet up and talking to topo)
- Monitor topo server latency/outages
- Validate cluster IDs in vtadmin config
- Run vtctldclient GetTablets as a smoke test
When it happens
Trigger: Calling vtadmin GetTablets when a cluster's tablet discovery fails: vtctld GetTablets RPC error, topo unreachable, or vttablet health/registration issues making the topo query fail.
Common situations: Tablets not yet registered in the topo; etcd/zk latency or outage; vtctld restarted or overloaded; wrong cluster ID configuration.
Related errors
- parse error
- not allowed: read-only security-policy enforced
- invalid joined path
- invalid key:value pair
- cell param required
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/7f591de5126d87c4.
Report an issue: GitHub.