{"record":{"id":"79e13de9954ee4c7","repo":"vitessio/vitess","slug":"failed-to-getcellinfos-for-cluster-s-w","errorCode":null,"errorMessage":"failed to GetCellInfos for cluster %s: %w","messagePattern":"failed to GetCellInfos for cluster (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtadmin/api.go","lineNumber":869,"sourceCode":"\tvar (\n\t\tm         sync.Mutex\n\t\twg        sync.WaitGroup\n\t\trec       concurrency.AllErrorRecorder\n\t\tcellInfos []*vtadminpb.ClusterCellInfo\n\t)\n\n\tfor _, c := range clusters {\n\t\tif !api.authz.IsAuthorized(ctx, c.ID, rbac.CellInfoResource, rbac.GetAction) {\n\t\t\tcontinue\n\t\t}\n\n\t\twg.Add(1)\n\t\tgo func(c *cluster.Cluster) {\n\t\t\tdefer wg.Done()\n\n\t\t\tclusterCellInfos, err := c.GetCellInfos(ctx, req)\n\t\t\tif err != nil {\n\t\t\t\trec.RecordError(fmt.Errorf(\"failed to GetCellInfos for cluster %s: %w\", c.ID, err))\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tm.Lock()\n\t\t\tdefer m.Unlock()\n\t\t\tcellInfos = append(cellInfos, clusterCellInfos...)\n\t\t}(c)\n\t}\n\n\twg.Wait()\n\tif rec.HasErrors() {\n\t\treturn nil, rec.Error()\n\t}\n\n\treturn &vtadminpb.GetCellInfosResponse{\n\t\tCellInfos: cellInfos,\n\t}, nil\n}","sourceCodeStart":851,"sourceCodeEnd":887,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtadmin/api.go#L851-L887","documentation":"VTAdmin aggregates CellInfos from every configured cluster in parallel; when cluster c.GetCellInfos fails, the per-cluster error is recorded on the shared AllErrorRecorder with this wrapper message that names the cluster ID and embeds the underlying error (%w). The RPC then fails if any cluster errored, so one bad cluster fails the whole GetCellInfos request.","triggerScenarios":"Calling vtadmin GetCellInfos when a configured cluster's vtctld is unreachable, the cluster is misconfigured (wrong vtctld address), or the underlying c.GetCellInfos call returns any error for that cluster.","commonSituations":"vtctld down or restarted; network/DNS issues between vtadmin and vtctld; stale cluster config after topology changes; auth failures against vtctld.","solutions":["Check the embedded %w cause to see which cluster and underlying failure occurred","Verify the cluster's vtctld address in the vtadmin cluster config and that vtctld is running","Test connectivity from the vtadmin host to the vtctld port (curl/grpcurl)","Remove or fix dead clusters in the vtadmin cluster configuration"],"exampleFix":"// before: single bad cluster fails everything\nclusterCellInfos, err := c.GetCellInfos(ctx, req)\nif err != nil {\n\trec.RecordError(fmt.Errorf(\"failed to GetCellInfos for cluster %s: %w\", c.ID, err))\n\treturn\n}\n// after: inspect and fix the cluster config / vtctld before retrying\n// e.g. verify c.Vtctld address, then:\nclusterCellInfos, err := c.GetCellInfos(ctx, req)\nif err != nil {\n\trec.RecordError(fmt.Errorf(\"failed to GetCellInfos for cluster %s: %w\", c.ID, err))\n\treturn\n}","handlingStrategy":"try-catch","validationCode":"// Go: check cluster health before aggregating\nfor _, c := range clusters {\n\tif err := c.Vtctld.CheckHealth(ctx); err != nil {\n\t\tlog.Printf(\"skipping unhealthy cluster %s: %v\", c.ID, err)\n\t}\n}","typeGuard":"func hasClusterErrors(rec concurrency.AllErrorRecorder) bool { return rec.HasErrors() }","tryCatchPattern":"resp, err := client.GetCellInfos(ctx, req)\nif err != nil {\n\tif strings.Contains(err.Error(), \"failed to GetCellInfos for cluster\") {\n\t\t// inspect cluster ID in message; check vtctld for that cluster\n\t}\n\treturn err\n}","preventionTips":["Monitor vtctld health for every configured cluster","Keep vtadmin cluster config in sync with real clusters","Add per-cluster health checks before aggregation endpoints","Alert on vtctld connectivity from vtadmin"],"tags":["vtadmin","vtctld","network","cluster-config"],"backgroundTag":"vtctld-unreachable","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}