Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions go/vt/vtctld/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,17 @@ func initAPI(ctx context.Context, ts *topo.Server, actions *ActionRepository, re

if cell == "local" {
if *localCell == "" {
return nil, fmt.Errorf("local cell requested, but not specified. Please set with -cell flag")
cells, err := ts.GetCellInfoNames(ctx)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that local is a reserved cell name and no one can use it for their cells? We need to document that.

if err != nil {
return nil, fmt.Errorf("could not fetch cell info: %v", err)
}
if len(cells) == 0 {
return nil, fmt.Errorf("no local cells have been created yet")
}
cell = cells[0]
} else {
cell = *localCell
}
cell = *localCell
}

// If a keyspace is provided then return the specified srvkeyspace.
Expand Down