diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-04-23 13:37:31 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-04-23 13:37:31 -0700 |
| commit | 73564e6a01770316f5ab57e7f4ba8227cedbf1dd (patch) | |
| tree | d326ea0d1c169cf5f4f31df266772a41de8a83f2 /weed/shell/command_volume_tier_upload.go | |
| parent | bdc337a71938dfa0821203a79dd4a0f7e69df6ab (diff) | |
| download | seaweedfs-73564e6a01770316f5ab57e7f4ba8227cedbf1dd.tar.xz seaweedfs-73564e6a01770316f5ab57e7f4ba8227cedbf1dd.zip | |
master: add cluster wide lock/unlock operation in weed shell
fix https://github.com/chrislusf/seaweedfs/issues/1286
Diffstat (limited to 'weed/shell/command_volume_tier_upload.go')
| -rw-r--r-- | weed/shell/command_volume_tier_upload.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/shell/command_volume_tier_upload.go b/weed/shell/command_volume_tier_upload.go index 5131e8f85..f92cdc3e4 100644 --- a/weed/shell/command_volume_tier_upload.go +++ b/weed/shell/command_volume_tier_upload.go @@ -56,6 +56,10 @@ func (c *commandVolumeTierUpload) Help() string { func (c *commandVolumeTierUpload) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { + if err = commandEnv.confirmIsLocked(); err != nil { + return + } + tierCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) volumeId := tierCommand.Int("volumeId", 0, "the volume id") collection := tierCommand.String("collection", "", "the collection name") |
