vitessio/vitess · error
GetCellInfoNames command takes no parameter
Error message
GetCellInfoNames command takes no parameter
What it means
Returned by the GetCellInfoNames vtctl command when the caller supplies arguments. GetCellInfoNames lists all cell names stored in the topology and accepts no parameters; passing any argument is a client-side usage error.
Source
Thrown at go/vt/vtctl/cell_info.go:139
}
if subFlags.NArg() != 1 {
return errors.New("the <cell> argument is required for the DeleteCellInfo command")
}
cell := subFlags.Arg(0)
_, err := wr.VtctldServer().DeleteCellInfo(ctx, &vtctldatapb.DeleteCellInfoRequest{
Name: cell,
Force: *force,
})
return err
}
func commandGetCellInfoNames(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("GetCellInfoNames command takes no parameter")
}
names, err := wr.TopoServer().GetCellInfoNames(ctx)
if err != nil {
return err
}
wr.Logger().Printf("%v\n", strings.Join(names, "\n"))
return nil
}
func commandGetCellInfo(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 <cell> argument is required for the GetCellInfo command")
}
// We use a strong read, because users using this command want theView on GitHub (pinned to 01a25a7d17)
Solutions
- Re-run with no positional arguments: `vtctldclient GetCellInfoNames`
- If you intended to fetch one cell's details, use `GetCellInfo <cell>` instead
Example fix
// before vtctldclient GetCellInfoNames zone1 // after vtctldclient GetCellInfoNames
Defensive patterns
Strategy: validation
Validate before calling
args := flagSet.Args()
if len(args) != 0 {
return errors.New("GetCellInfoNames command takes no parameter")
} Type guard
func takesNoArgs(args []string) bool { return len(args) == 0 } Try / catch
if err := commandGetCellInfoNames(ctx, wr, subFlags, args); err != nil {
if strings.Contains(err.Error(), "takes no parameter") {
log.Printf("usage: GetCellInfoNames (no arguments)")
}
return err
} Prevention
- Do not confuse GetCellInfoNames (no args) with GetCellInfo <cell> (one arg)
- Strip stray arguments before invoking in shell pipelines
When it happens
Trigger: Running `vtctldclient GetCellInfoNames <something>` — any extra positional token triggers the error.
Common situations: Confusing GetCellInfoNames with GetCellInfo (which does take a <cell> argument) and passing a cell name; a script appending a leftover argument.
Related errors
- the <cell> argument is required for the UpdateCellInfo comma
- the <cell> argument is required for the DeleteCellInfo comma
- the <cell> argument is required for the GetCellInfo command
- the <alias> argument is required for the AddCellsAlias comma
- the <alias> argument is required for the UpdateCellsAlias co
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/469f6284b05a55fd.
Report an issue: GitHub.