{"record":{"id":"e6754afe7f2092e3","repo":"vitessio/vitess","slug":"getcellinfonames-w","errorCode":null,"errorMessage":"GetCellInfoNames(): %w","messagePattern":"GetCellInfoNames\\(\\): %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/topo/helpers/copy.go","lineNumber":165,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// CopyShardReplications will create the ShardReplication objects in\n// the destination topo.\nfunc CopyShardReplications(ctx context.Context, fromTS, toTS *topo.Server) error {\n\tkeyspaces, err := fromTS.GetKeyspaces(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"fromTS.GetKeyspaces: %w\", err)\n\t}\n\n\tcells, err := fromTS.GetCellInfoNames(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"GetCellInfoNames(): %w\", err)\n\t}\n\n\tfor _, keyspace := range keyspaces {\n\t\tshards, err := fromTS.GetShardNames(ctx, keyspace)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"GetShardNames(%v): %w\", keyspace, err)\n\t\t}\n\n\t\tfor _, shard := range shards {\n\t\t\tfor _, cell := range cells {\n\t\t\t\tsri, err := fromTS.GetShardReplication(ctx, cell, keyspace, shard)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"GetShardReplication(%v, %v, %v): %w\", cell, keyspace, shard, err)\n\t\t\t\t}\n\n\t\t\t\tsriNodes := map[string]struct{}{}\n\t\t\t\tfor _, node := range sri.Nodes {\n\t\t\t\t\tsriNodes[topoproto.TabletAliasString(node.TabletAlias)] = struct{}{}","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/topo/helpers/copy.go#L147-L183","documentation":"CopyShardReplications needs the list of cells in the source topo to iterate ShardReplication objects per cell. This error wraps a failure of fromTS.GetCellInfoNames, i.e. the cell inventory of the source topo could not be read.","triggerScenarios":"Calling CopyShardReplications when fromTS.GetCellInfoNames fails: source topo backend unreachable, cell directory missing/corrupt, or permission denied reading the cells path.","commonSituations":"Source etcd2/server topo root misconfigured; cells were never created in the source topo; partial topo corruption after a failed migration.","solutions":["Inspect the wrapped inner error for the source topo failure","Confirm cells exist in the source topo (vtctldclient GetCellInfoNames or equivalent)","Verify source topo server configuration (topo_type, server address, root)","Retry after fixing the source topo backend"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"cells, err := fromTS.GetCellInfoNames(ctx)\nif err != nil {\n    return fmt.Errorf(\"source cells unreadable: %w\", err)\n}\nif len(cells) == 0 {\n    log.Warn(\"source topo has no cells\")\n}","typeGuard":null,"tryCatchPattern":"err := helpers.CopyShardReplications(ctx, fromTS, toTS)\nif err != nil {\n    if strings.Contains(err.Error(), \"GetCellInfoNames\") {\n        // fall back to inspecting source topo manually\n        log.Errorf(\"cell listing failed: %v\", err)\n    }\n}","preventionTips":["Ensure all cells are created in the source topo before copying","Validate the topo root configuration matches the deployed topology","Test source topo read access with a cheap call (GetCellInfoNames) before bulk operations"],"tags":["topo","cells","source-topo"],"backgroundTag":"topo-cell-list-failed","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}