vitessio/vitess · error
found unsupported action %s
Error message
found unsupported action %s
What it means
After normalizing aliases (e.g. 'completed' to 'complete'), the action string must map to one of the implemented vreplication workflow actions in the switch statement. An action string that falls through all cases reaches the default branch and errors. The error quotes the original (pre-normalization) action the user supplied.
Source
Thrown at go/vt/vtctl/vtctl.go:2491
for _, wfErr := range wfErrs {
wr.Logger().Printf("\tTablet: %d, Id: %d :: %s\n", wfErr.Tablet, wfErr.ID, wfErr.Description)
}
return errors.New("errors starting workflow")
}
}
case vReplicationWorkflowActionSwitchTraffic:
dryRunResults, err = wf.SwitchTraffic(workflow.DirectionForward)
case vReplicationWorkflowActionReverseTraffic:
dryRunResults, err = wf.ReverseTraffic()
case vReplicationWorkflowActionComplete:
dryRunResults, err = wf.Complete()
case vReplicationWorkflowActionCancel:
err = wf.Cancel()
case vReplicationWorkflowActionGetState:
wr.Logger().Printf(wf.CachedState() + "\n")
return nil
default:
return fmt.Errorf("found unsupported action %s", originalAction)
}
if err != nil {
log.Warn(fmt.Sprintf(" %s error: %v", originalAction, wf))
return wrapError(wf, err)
}
if *dryRun {
if len(*dryRunResults) > 0 {
wr.Logger().Printf("Dry Run results for %s run at %s\nParameters: %s\n\n", originalAction, time.Now().Format(time.RFC822), strings.Join(args, " "))
wr.Logger().Printf("%s\n", strings.Join(*dryRunResults, "\n"))
return nil
}
}
wr.Logger().Printf("%s was successful for workflow %s.%s\nStart State: %s\nCurrent State: %s\n\n",
originalAction, vrwp.TargetKeyspace, vrwp.Workflow, startState, wf.CurrentState())
return nil
}
func commandCreateLookupVindex(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {View on GitHub (pinned to 01a25a7d17)
Solutions
- Use one of the supported actions: create, switchtraffic, reversetraffic, complete, cancel, show, starttraffic, stoptraffic, etc.
- Run `vtctldclient <workflow> --help` to list valid actions
- Fix shell interpolation so the action variable is populated correctly
Example fix
// before vtctldclient Reshard complet commerce.reshard // after vtctldclient Reshard complete commerce.reshard
Defensive patterns
Strategy: validation
Validate before calling
const actions = ["create","switchtraffic","reversetraffic","complete","cancel","show","starttraffic","stoptraffic","writetables","dryrun","retrytraffic","showtraffic","getstate","updateheaders","cancelmigratedtables"," finalizemigratedtables"]
if !actions.includes(action) { fail("unsupported action: " + action) } Type guard
func isVReplicationAction(a string) bool {
switch strings.ToLower(a) {
case "create", "switchtraffic", "reversetraffic", "complete", "cancel", "show":
return true
}
return false
} Prevention
- Copy action names from --help output, not memory
- Spell-check action variables in shell scripts (set -u helps catch empty vars)
When it happens
Trigger: Typo in the action, e.g. `vtctldclient Reshard complet`, `swichtraffic`, `canel`; passing a verb that exists in other tools but not here; shell scripts interpolating an empty or garbled action token.
Common situations: Shell script variable typo; migrating from older vtctlclient commands with different action names; case sensitivity mistakes.
Related errors
- invalid format for external source cluster: %s
- invalid value for on-ddl: %v
- invalid action for Migrate: %s
- unknown workflow type passed: %v
- workflow %s does not exist
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/2bc91ed6b1c2cad5.
Report an issue: GitHub.