vitessio/vitess · error
the <cell> argument is required for the UpdateCellInfo comma
Error message
the <cell> argument is required for the UpdateCellInfo command
What it means
commandUpdateCellInfo validates that exactly one positional argument (the cell name) was supplied after flag parsing. This error is returned when the caller ran `UpdateCellInfo` with zero positional arguments or more than one. UpdateCellInfo mutates a cell's CellInfo (server address, root path) in the global topology, so the target cell name is mandatory.
Source
Thrown at go/vt/vtctl/cell_info.go:103
_, err := wr.VtctldServer().AddCellInfo(ctx, &vtctldatapb.AddCellInfoRequest{
Name: cell,
CellInfo: &topodatapb.CellInfo{
ServerAddress: *serverAddress,
Root: *root,
},
})
return err
}
func commandUpdateCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {
serverAddress := subFlags.String("server_address", "", "The address the topology server is using for that cell.")
root := subFlags.String("root", "", "The root path the topology server is using for that cell.")
if err := subFlags.Parse(args); err != nil {
return err
}
if subFlags.NArg() != 1 {
return errors.New("the <cell> argument is required for the UpdateCellInfo command")
}
cell := subFlags.Arg(0)
_, err := wr.VtctldServer().UpdateCellInfo(ctx, &vtctldatapb.UpdateCellInfoRequest{
Name: cell,
CellInfo: &topodatapb.CellInfo{
ServerAddress: *serverAddress,
Root: *root,
},
})
return err
}
func commandDeleteCellInfo(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {
force := subFlags.Bool("force", false, "Proceeds even if the cell's topology server cannot be reached. The assumption is that you turned down the entire cell, and just need to update the global topo data.")
if err := subFlags.Parse(args); err != nil {
return err
}View on GitHub (pinned to 01a25a7d17)
Solutions
- Re-run with exactly one positional argument: `vtctldclient UpdateCellInfo --server-address <addr> --root <root> <cell>`
- Place the cell name after all flags so pflag does not consume it
- Quote the cell name if it contains spaces to keep NArg()==1
Example fix
// before vtctldclient UpdateCellInfo --server-address zone1-1:5999 // after vtctldclient UpdateCellInfo --server-address zone1-1:5999 zone1
Defensive patterns
Strategy: validation
Validate before calling
args := flagSet.Args()
if len(args) != 1 {
return errors.New("the <cell> argument is required for the UpdateCellInfo command")
}
cell := args[0] Type guard
func hasExactlyOneArg(args []string) bool { return len(args) == 1 } Try / catch
if err := commandUpdateCellInfo(ctx, wr, subFlags, args); err != nil {
if strings.Contains(err.Error(), "the <cell> argument is required") {
log.Printf("usage: UpdateCellInfo [--server-address <addr>] [--root <root>] <cell>")
}
return err
} Prevention
- Always put the cell name as the last token after all flags
- Quote cell names containing special characters
- Check `vtctldclient <command> --help` for the expected positional signature
When it happens
Trigger: Running `vtctldclient UpdateCellInfo` with no cell name, or passing the cell name before flags so pflag consumes it as a flag value, or passing two positional arguments (subFlags.NArg() != 1).
Common situations: Forgotten cell argument in scripts; quoting mistakes that split the cell name into two args; reordering arguments so the cell name is swallowed by a flag like --server_address.
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 <cell> argument is required for the DeleteCellInfo comma
- GetCellInfoNames command takes no parameter
- 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/b622a10470c454e8.
Report an issue: GitHub.