vitessio/vitess · error
failed to get tablet %s from topology: %v
Error message
failed to get tablet %s from topology: %v
What it means
Returned by mysqlctl clone logic when the tablet identified by the given alias cannot be fetched from the topology service, wrapping the underlying topo error.
Source
Thrown at go/vt/mysqlctl/clone.go:107
return replication.Position{}, fmt.Errorf("shard %s/%s has no primary", keyspace, shard)
}
donorAlias = si.PrimaryAlias
log.Info(fmt.Sprintf("Found primary tablet %s for use as CLONE REMOTE donor", topoproto.TabletAliasString(donorAlias)))
case cloneFromTablet != "":
// Parse the explicit donor tablet alias.
log.Info(fmt.Sprintf("Using tablet %s for use as CLONE REMOTE donor", cloneFromTablet))
donorAlias, err = topoproto.ParseTabletAlias(cloneFromTablet)
if err != nil {
return replication.Position{}, fmt.Errorf("invalid tablet alias %q: %v", cloneFromTablet, err)
}
default:
return replication.Position{}, errors.New("no donor specified")
}
// Get donor tablet info from topology.
donorTablet, err := topoServer.GetTablet(ctx, donorAlias)
if err != nil {
return replication.Position{}, fmt.Errorf("failed to get tablet %s from topology: %v", topoproto.TabletAliasString(donorAlias), err)
}
// Get clone credentials.
cloneConfig := dbconfigs.GlobalDBConfigs.CloneUser
if cloneConfig.User == "" {
return replication.Position{}, errors.New("clone user not configured; set --db-clone-user flag")
}
// Create the clone executor.
executor := &CloneExecutor{
DonorHost: donorTablet.MysqlHostname,
DonorPort: int(donorTablet.MysqlPort),
DonorUser: cloneConfig.User,
DonorPassword: cloneConfig.Password,
UseSSL: cloneConfig.UseSSL,
}
log.Info(fmt.Sprintf("Clone executor configured for donor %s:%d", executor.DonorHost, executor.DonorPort))View on GitHub (pinned to 01a25a7d17)
Solutions
- Confirm the tablet still exists with `vtctldclient GetTablet <alias>`.
- Pick an existing donor tablet alias from `vtctldclient GetTablets`.
- Check topology server connectivity.
- If the alias is stale, remove the stale record (`DeleteTablet`) and select a live donor.
Defensive patterns
Strategy: validation
Validate before calling
tablet, err := topoServer.GetTablet(ctx, donorAlias)
if err != nil {
return fmt.Errorf("donor %s unavailable: %w", topoproto.TabletAliasString(donorAlias), err)
} Try / catch
if err != nil && strings.Contains(err.Error(), "failed to get tablet") {
// pick another donor alias or fix topo connectivity
} Prevention
- Resolve donor alias fresh from topo at restore time
- Remove stale tablet records after decommissioning
When it happens
Trigger: CloneFromDonor with an alias whose tablet record was deleted from topo, an unreachable topo backend, or an alias from a different topo server/environment.
Common situations: Tablet was decommissioned but alias still referenced in configs; topo outage; running restore against a different cluster's topo; stale shard record after tablet removal.
Related errors
- failed to get shard %s/%s: %v
- shard %s/%s has no primary
- failed to delete tablet: %w
- cannot find tablet: %+v
- tablet %v type change %v -> %v is not an allowed transition
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/e72b8fd0207fb616.
Report an issue: GitHub.