8000 torusctl: set-replication requires one argument to set replication count by nak3 · Pull Request #307 · coreos/torus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 22, 2020. It is now read-only.

torusctl: set-replication requires one argument to set replication count #307

Merged
merge 8000 d 1 commit into from
Sep 6, 2016
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
6 changes: 5 additions & 1 deletion cmd/torusctl/ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var ringCommand = &cobra.Command{
}

var ringChangeReplicationCommand = &cobra.Command{
Use: "set-replication [AMOUNT]",
Use: "set-replication AMOUNT",
Short: "set the replication count for the cluster",
Run: ringChangeReplicationAction,
}
Expand Down Expand Up @@ -164,6 +164,10 @@ func ringChangePreRun(cmd *cobra.Command, args []string) {
}

func ringChangeReplicationAction(cmd *cobra.Command, args []string) {
if len(args) != 1 {
cmd.Usage()
os.Exit(1)
}
amount, err := strconv.Atoi(args[0])
if err != nil {
die("not an integer number of replicas: %s", args[0])
Expand Down
0