vitessio/vitess · error
--cells-no-recovery contains cell
Error message
--cells-no-recovery contains cell %q which does not exist in the topology (known cells: %v)
What it means
At vtorc startup, the --cells-no-recovery flag lists cells where primary health recovery should not run. validateCellsNoRecovery cross-checks every listed cell against the cells known to the topology and fails fast if any cell does not exist, including the known cell list in the message.
Solutions
- List actual cells: vtctl --topo_implementation ... GetCellsInfo (or topo GetKnownCells) and correct --cells-no-recovery to match exactly
- Remove decommissioned cells from the flag
- Verify vtorc is connected to the correct topology (global vs local) — the cells must exist in the topo vtorc reads
- Restart vtorc after fixing the flag; validation is re-run at OpenTabletDiscovery
Example fix
// before --cells-no-recovery zone1,zone2,zone3 # zone3 does not exist // after --cells-no-recovery zone1,zone2
Defensive patterns
Strategy: validation
Validate before calling
# Validate --cells-no-recovery against the topology before starting vtorc
KNOWN=$(vtctldclient GetCellsInfo 2>/dev/null | awk '{print $1}')
for cell in $(echo "$CELLS_NO_RECOVERY" | tr ',' ' '); do
if ! echo "$KNOWN" | grep -qx "$cell"; then
echo "cell $cell not in topology"; exit 1
fi
done Prevention
- Generate --cells-no-recovery from topo queries instead of hardcoding it
- Remove cells from the flag as part of cell decommissioning runbooks
- Keep per-environment vtorc configs separate; don't copy flags across envs
- Check the error message's 'known cells' list — it tells you the exact valid values
When it happens
Trigger: OpenTabletDiscovery -> validateCellsNoRecovery when a cell named in --cells-no-recovery is absent from topo.GetKnownCells — typically a typo, a decommissioned cell, or a vtorc instance connected to a different topo than the cells belong to.
Common situations: Copy-pasting vtorc config between environments (staging vs prod cells), renaming cells during a datacenter migration, or stale flag values left after cell removal.
Related errors
- failed to read primary instance
- failed to read shard primary for
- invalid key range while parsing clusters to watch
- keyspace not found
- no local cells have been created yet
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/58156d584a2ea1d6.
Report an issue: GitHub.
Appendix: source
Thrown at go/vt/vtorc/logic/tablet_discovery.go:162
}
// Trim whitespace so that "--cells-no-recovery=cell1, cell2" works the
// same as "--cells-no-recovery=cell1,cell2". pflag's StringSliceVar
// splits on commas but does not strip surrounding whitespace.
for i, cell := range cellsNoRecovery {
cellsNoRecovery[i] = strings.TrimSpace(cell)
}
knownCells, err := ts.GetKnownCells(ctx)
if err != nil {
log.Warn(fmt.Sprintf("failed to get known cells while validating --cells-no-recovery, skipping validation: %v", err))
return nil
}
knownCellSet := make(map[string]struct{}, len(knownCells))
for _, cell := range knownCells {
knownCellSet[cell] = struct{}{}
}
for _, cell := range cellsNoRecovery {
if _, ok := knownCellSet[cell]; !ok {
return fmt.Errorf("--cells-no-recovery contains cell %q which does not exist in the topology (known cells: %v)", cell, knownCells)
}
}
cellsNoRecoveryValidated.Store(true)
return nil
}
// initializeShardsToWatch parses the --clusters_to_watch flag-value
// into a map of keyspace/shards.
func initializeShardsToWatch() error {
shardsToWatch = make(map[string][]*topodatapb.KeyRange)
if len(clustersToWatch) == 0 {
return nil
}
for _, ks := range clustersToWatch {
if strings.Contains(ks, "/") && !strings.HasSuffix(ks, "/") {
// Validate keyspace/shard parses.
k, s, err := topoproto.ParseKeyspaceShard(ks)View on GitHub (pinned to 01a25a7d17)