vitessio/vitess · error
GetCellsAliases command takes no parameter
Error message
GetCellsAliases command takes no parameter
What it means
Returned by the GetCellsAliases vtctl command when the caller supplies arguments. GetCellsAliases lists all cells aliases and takes no parameters; any argument indicates a client-side usage mistake.
Source
Thrown at go/vt/vtctl/cells_aliases.go:132
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 {
return err
}
return printJSON(wr.Logger(), aliases)
}
View on GitHub (pinned to 01a25a7d17)
Solutions
- Re-run with no positional arguments: `vtctldclient GetCellsAliases`
- To inspect a single alias's membership, parse the JSON output of GetCellsAliases instead
Example fix
// before vtctldclient GetCellsAliases dcalias // after vtctldclient GetCellsAliases
Defensive patterns
Strategy: validation
Validate before calling
args := flagSet.Args()
if len(args) != 0 {
return errors.New("GetCellsAliases command takes no parameter")
} Type guard
func takesNoArgs(args []string) bool { return len(args) == 0 } Try / catch
if err := commandGetCellsAliases(ctx, wr, subFlags, args); err != nil {
if strings.Contains(err.Error(), "takes no parameter") {
log.Printf("usage: GetCellsAliases (no arguments)")
}
return err
} Prevention
- Do not pass an alias to GetCellsAliases — it lists all aliases
- Parse the JSON output to inspect a specific alias
When it happens
Trigger: Running `vtctldclient GetCellsAliases <alias>` — any positional token triggers the error.
Common situations: Confusing GetCellsAliases with DeleteCellsAlias/UpdateCellsAlias (which take an <alias> argument) and passing one; leftover arguments in shell pipelines.
Related errors
- the <alias> argument is required for the AddCellsAlias comma
- the <alias> argument is required for the UpdateCellsAlias co
- the <alias> argument is required for the DeleteCellsAlias co
- 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/c137decbcf3c2107.
Report an issue: GitHub.