vitessio/vitess · error
the <alias> argument is required for the DeleteCellsAlias co
Error message
the <alias> argument is required for the DeleteCellsAlias command
What it means
Returned by the DeleteCellsAlias vtctl command when no <alias> argument is given. The alias identifies the CellsAlias object to delete from the topology, so it must be provided.
Source
Thrown at go/vt/vtctl/cells_aliases.go:117
(*cells)[i] = strings.TrimSpace(cell)
}
alias := subFlags.Arg(0)
_, err := wr.VtctldServer().UpdateCellsAlias(ctx, &vtctldatapb.UpdateCellsAliasRequest{
Name: alias,
CellsAlias: &topodatapb.CellsAlias{
Cells: *cells,
},
})
return err
}
func commandDeleteCellsAlias(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {
if err := subFlags.Parse(args); err != nil {
return err
}
if subFlags.NArg() != 1 {
return errors.New("the <alias> argument is required for the DeleteCellsAlias command")
}
alias := subFlags.Arg(0)
_, err := wr.VtctldServer().DeleteCellsAlias(ctx, &vtctldatapb.DeleteCellsAliasRequest{
Name: alias,
})
return err
}
func commandGetCellsAliases(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {
if err := subFlags.Parse(args); err != nil {
return err
}
if subFlags.NArg() != 0 {
return errors.New("GetCellsAliases command takes no parameter")
}
aliases, err := wr.TopoServer().GetCellsAliases(ctx, true /*strongRead*/)
if err != nil {View on GitHub (pinned to 01a25a7d17)
Solutions
- Re-run as `vtctldclient DeleteCellsAlias <alias>` with exactly one positional argument
- Verify you are targeting the alias, not a cell — DeleteCellInfo is the cell-level command
Example fix
// before vtctldclient DeleteCellsAlias // after vtctldclient DeleteCellsAlias dcalias
Defensive patterns
Strategy: validation
Validate before calling
args := flagSet.Args()
if len(args) != 1 {
return errors.New("the <alias> argument is required for the DeleteCellsAlias command")
}
alias := args[0] Type guard
func hasExactlyOneArg(args []string) bool { return len(args) == 1 } Try / catch
if err := commandDeleteCellsAlias(ctx, wr, subFlags, args); err != nil {
if strings.Contains(err.Error(), "the <alias> argument is required") {
log.Printf("usage: DeleteCellsAlias <alias>")
}
return err
} Prevention
- Pass only the alias — never list member cells positionally
- Do not confuse with DeleteCellInfo which takes a cell name
- Confirm the alias variable is non-empty in teardown scripts
When it happens
Trigger: Running `vtctldclient DeleteCellsAlias` with no alias, or with extra positional arguments.
Common situations: Empty alias variable in decommissioning scripts; passing cell names after the alias thinking they must be listed; confusing this with DeleteCellInfo (different command, different object).
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- the <alias> argument is required for the AddCellsAlias comma
- the <alias> argument is required for the UpdateCellsAlias co
- GetCellsAliases command takes no parameter
- the <cell> argument is required for the UpdateCellInfo comma
- the <cell> argument is required for the DeleteCellInfo comma
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/4bf5eb60f5c23b72.
Report an issue: GitHub.