|
@ -76,14 +76,19 @@ func (c *commandVolumeBalance) Do(args []string, commandEnv *CommandEnv, writer |
|
|
dc := balanceCommand.String("dataCenter", "", "only apply the balancing for this dataCenter") |
|
|
dc := balanceCommand.String("dataCenter", "", "only apply the balancing for this dataCenter") |
|
|
racks := balanceCommand.String("racks", "", "only apply the balancing for this racks") |
|
|
racks := balanceCommand.String("racks", "", "only apply the balancing for this racks") |
|
|
nodes := balanceCommand.String("nodes", "", "only apply the balancing for this nodes") |
|
|
nodes := balanceCommand.String("nodes", "", "only apply the balancing for this nodes") |
|
|
|
|
|
noLock := balanceCommand.Bool("noLock", false, "do not lock the admin shell at one's own risk") |
|
|
applyBalancing := balanceCommand.Bool("force", false, "apply the balancing plan.") |
|
|
applyBalancing := balanceCommand.Bool("force", false, "apply the balancing plan.") |
|
|
if err = balanceCommand.Parse(args); err != nil { |
|
|
if err = balanceCommand.Parse(args); err != nil { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
infoAboutSimulationMode(writer, *applyBalancing, "-force") |
|
|
infoAboutSimulationMode(writer, *applyBalancing, "-force") |
|
|
|
|
|
|
|
|
if err = commandEnv.confirmIsLocked(args); err != nil { |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
if *noLock { |
|
|
|
|
|
commandEnv.noLock = true |
|
|
|
|
|
} else { |
|
|
|
|
|
if err = commandEnv.confirmIsLocked(args); err != nil { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// collect topology information
|
|
|
// collect topology information
|
|
|