vitessio/vitess · error
active reparent commands disabled (unset the --disable-activ
Error message
active reparent commands disabled (unset the --disable-active-reparents flag to enable)
What it means
commandReparentTablet, the vtctldclient ReparentTablet command handler, refuses to run when active reparenting is globally disabled via mysqlctl.DisableActiveReparents. Vitess deployments that delegate reparenting to an external tool (e.g. Orchestrator) set --disable-active-reparents, and this guard prevents vtctld from racing that tool.
Source
Thrown at go/vt/vtctl/reparent.go:72
})
addCommand("Shards", command{
name: "EmergencyReparentShard",
method: commandEmergencyReparentShard,
params: "--keyspace_shard=<keyspace/shard> [--new-primary=<tablet alias>] [--allow-split-brain-promotion] [--wait_replicas_timeout=<duration>] [--ignore_replicas=<tablet alias list>] [--prevent_cross_cell_promotion=<true/false>]",
help: "Reparents the shard to the new primary. Assumes the old primary is dead and not responding.",
})
addCommand("Shards", command{
name: "TabletExternallyReparented",
method: commandTabletExternallyReparented,
params: "<tablet alias>",
help: "Changes metadata in the topology server to acknowledge a shard primary change performed by an external tool. See the Reparenting guide for more information:" +
"https://vitess.io/docs/user-guides/reparenting/#external-reparenting",
})
}
func commandReparentTablet(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {
if mysqlctl.DisableActiveReparents {
return errors.New("active reparent commands disabled (unset the --disable-active-reparents flag to enable)")
}
if err := subFlags.Parse(args); err != nil {
return err
}
if subFlags.NArg() != 1 {
return errors.New("action ReparentTablet requires <tablet alias>")
}
tabletAlias, err := topoproto.ParseTabletAlias(subFlags.Arg(0))
if err != nil {
return err
}
return wr.ReparentTablet(ctx, tabletAlias)
}
func commandInitShardPrimary(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {
if mysqlctl.DisableActiveReparents {
return errors.New("active reparent commands disabled (unset the --disable-active-reparents flag to enable)")View on GitHub (pinned to 01a25a7d17)
Solutions
- Remove the --disable-active-reparents flag from vttablet/vtctld startup and restart the processes if Vitess-managed reparenting is desired
- Use the external reparenting tool instead of vtctldclient ReparentTablet (see the external reparenting user guide)
- If this is a new shard init rather than a reparent, use InitShardPrimary — noting it is equally guarded when disabled
Example fix
// before (vttablet args) --disable-active-reparents // after # remove the flag; then: vtctldclient ReparentTablet zone1-0000000100
Defensive patterns
Strategy: validation
Validate before calling
if mysqlctl.DisableActiveReparents {
return errors.New("reparenting is delegated to an external tool; use it instead of vtctldclient")
} Prevention
- Check cluster startup flags before running reparent commands
- Route reparenting through the external tool when --disable-active-reparents is set
- Document the flag's effect in runbooks so operators are not surprised
When it happens
Trigger: Running `vtctldclient ReparentTablet <alias>` against a cluster started with the --disable-active-reparents flag on vttablets/vtctld.
Common situations: Operators migrating a cluster to external reparenting and forgetting the flag blocks built-in commands; CI/e2e environments launched with the flag for safety; habitual use of ReparentTablet after a config change.
Related errors
- action ReparentTablet requires <tablet alias>
- action InitShardPrimary requires <keyspace/shard> <tablet al
- --s3-backup-storage-bucket required
- direct DDL is disabled
- online DDL is disabled
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/530f412a754cdec0.
Report an issue: GitHub.