master: add cluster wide lock/unlock operation in weed shell

fix https://github.com/chrislusf/seaweedfs/issues/1286
This commit is contained in:
Chris Lu
2020-04-23 13:37:31 -07:00
parent bdc337a719
commit 73564e6a01
18 changed files with 76 additions and 1 deletions

View File

@@ -98,6 +98,10 @@ func (c *commandEcBalance) Help() string {
func (c *commandEcBalance) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
if err = commandEnv.confirmIsLocked(); err != nil {
return
}
balanceCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
collection := balanceCommand.String("collection", "EACH_COLLECTION", "collection name, or \"EACH_COLLECTION\" for each collection")
dc := balanceCommand.String("dataCenter", "", "only apply the balancing for this dataCenter")