vitessio/vitess · error

Unknown OnlineDDL command: %s

Error message

Unknown OnlineDDL command: %s

What it means

commandWorkflow (OnlineDDL path) dispatches on the workflow sub-command string against a fixed list of supported OnlineDDL commands (complete, cancel, retry, launch, throttle, unthrottle and their -all variants). Any unrecognized command string hits the default branch and errors before any query is generated.

Source

Thrown at go/vt/vtctl/vtctl.go:3094

				from _vt.schema_migrations where %s %s %s`, condition, order, skipLimit)
	case "retry", "cleanup":
		// Do not support 'ALL' argument
		applySchemaQuery, err = generateOnlineDDLQuery(command, arg, false)
	case
		"launch",
		"launch-all",
		"complete",
		"complete-all",
		"cancel",
		"cancel-all",
		"throttle",
		"throttle-all",
		"unthrottle",
		"unthrottle-all":
		// Support 'ALL' argument
		applySchemaQuery, err = generateOnlineDDLQuery(command, arg, true)
	default:
		return fmt.Errorf("Unknown OnlineDDL command: %s", command)
	}
	if err != nil {
		return fmt.Errorf("Error generating OnlineDDL query: %+v", err)
	}

	if applySchemaQuery != "" {
		log.Info("Calling ApplySchema on VtctldServer")

		resp, err := wr.VtctldServer().ApplySchema(ctx, &vtctldatapb.ApplySchemaRequest{
			Keyspace:            keyspace,
			Sql:                 []string{applySchemaQuery},
			WaitReplicasTimeout: protoutil.DurationToProto(grpcvtctldserver.DefaultWaitReplicasTimeout),
		})
		if err != nil {
			return err
		}
		loggerWriter{wr.Logger()}.Printf("resp: %v\n", resp)
	} else {

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Run `vtctldclient workflow --help` to see the supported sub-commands
  2. Use one of: cancel, cancel-all, complete, complete-all, launch, launch-all, retry, retry-all, show, show-throttled, throttle, throttle-all, unthrottle, unthrottle-all
  3. Update scripts to the renamed command in this Vitess version

Example fix

// before
vtctldclient workflow cancle commerce.my_migration
// after
vtctldclient workflow cancel commerce.my_migration
Defensive patterns

Strategy: validation

Validate before calling

const onlineDDLCommands = ["cancel","cancel-all","complete","complete-all","launch","launch-all","retry","retry-all","show","show-throttled","throttle","throttle-all","unthrottle","unthrottle-all"]
if !onlineDDLCommands.includes(command) { fail("unknown OnlineDDL command: " + command) }

Type guard

func isKnownOnlineDDLCommand(c string) bool {
  switch c {
  case "cancel", "cancel-all", "complete", "complete-all", "launch", "launch-all",
    "retry", "retry-all", "throttle", "throttle-all", "unthrottle", "unthrottle-all":
    return true
  }
  return false
}

Prevention

When it happens

Trigger: `vtctldclient workflow foobar ks.wf`; older command names removed/renamed in this version; typo'd verbs like 'cancle' or 'complet'; empty command token from shell interpolation.

Common situations: Following outdated documentation or blog posts with retired verbs; shell variable left empty; autocomplete producing a wrong command.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/be873a34b0e54c56. Report an issue: GitHub.