{"record":{"id":"cf4936675ed98ca3","repo":"vitessio/vitess","slug":"there-is-no-vitess-cluster-named-s","errorCode":null,"errorMessage":"there is no vitess cluster named %s","messagePattern":"there is no vitess cluster named (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtctl/vtctl.go","lineNumber":3885,"sourceCode":"\t\treturn nil\n\t}\n\tif subFlags.NArg() != 1 {\n\t\treturn errors.New(\"cluster name needs to be provided\")\n\t}\n\n\tclusterName := subFlags.Arg(0)\n\tswitch *clusterType {\n\tcase \"vitess\":\n\t\tswitch {\n\t\tcase *unmount:\n\t\t\treturn wr.UnmountExternalVitessCluster(ctx, clusterName)\n\t\tcase *show:\n\t\t\tvci, err := wr.TopoServer().GetExternalVitessCluster(ctx, clusterName)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif vci == nil {\n\t\t\t\treturn fmt.Errorf(\"there is no vitess cluster named %s\", clusterName)\n\t\t\t}\n\t\t\tdata, err := json.Marshal(vci)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\twr.Logger().Printf(\"%s\\n\", string(data))\n\t\t\treturn nil\n\t\tdefault:\n\t\t\treturn wr.MountExternalVitessCluster(ctx, clusterName, *topoType, *topoServer, *topoRoot)\n\t\t}\n\tcase \"mysql\":\n\t\treturn errors.New(\"mysql cluster type not yet supported\")\n\tdefault:\n\t\treturn errors.New(\"cluster type can be only one of vitess or mysql\")\n\t}\n}\n\nfunc commandGenerateShardRanges(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {","sourceCodeStart":3867,"sourceCodeEnd":3903,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtctl/vtctl.go#L3867-L3903","documentation":"For the `Show` sub-command of external vitess clusters, GetExternalVitessCluster returned nil (not found) with no error, so the command reports that no cluster with that name exists in the topo. External cluster names are stored in the topo's external cluster map.","triggerScenarios":"Running `vtctldclient <ExternalCluster?> show <clusterName>` where the cluster was never created or was deleted (GetExternalVitessCluster returns nil, nil).","commonSituations":"Typo in external cluster name; cluster created in a different topo environment; forgot to run `ExternalCluster Add`/`ExternalCluster Set` before show/move operations; nil result after removing clusters during cleanup.","solutions":["List existing clusters to check the name (e.g. `ExternalCluster` list path in vtctldclient)","Create/point the cluster first: `vtctldclient ExternalCluster Add <name> <topo-type> <server>` then Set","Verify you are using the correct topo server before retrying"],"exampleFix":"// before\nvtctldclient ExternalCluster show remote-ks   # not registered\n// after\nvtctldclient ExternalCluster Add remote-ks etcd2 remote-topo:2379\nvtctldclient ExternalCluster show remote-ks","handlingStrategy":"fallback","validationCode":"clusters, err := wr.TopoServer().GetExternalVitessClusters(ctx)\n// check clusterName is present in clusters before show/move","typeGuard":null,"tryCatchPattern":"vci, err := wr.TopoServer().GetExternalVitessCluster(ctx, name)\nif err != nil { return err }\nif vci == nil {\n\treturn fmt.Errorf(\"cluster %s not registered; run ExternalCluster Add first\", name)\n}","preventionTips":["Register external clusters with ExternalCluster Add/Set before show or move operations","List external clusters to verify names in scripts","Keep external cluster config in a runbook tied to each environment"],"tags":["vtctl","topo","external-cluster","go"],"backgroundTag":"cluster-not-found","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}