Browse Source

[shell] volume copy add param noLock (#6871)

pull/6872/head
Konstantin Lebedev 4 months ago
committed by GitHub
parent
commit
958d88cb85
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      weed/shell/command_volume_copy.go

5
weed/shell/command_volume_copy.go

@ -41,11 +41,14 @@ func (c *commandVolumeCopy) Do(args []string, commandEnv *CommandEnv, writer io.
volumeIdInt := volCopyCommand.Int("volumeId", 0, "the volume id") volumeIdInt := volCopyCommand.Int("volumeId", 0, "the volume id")
sourceNodeStr := volCopyCommand.String("source", "", "the source volume server <host>:<port>") sourceNodeStr := volCopyCommand.String("source", "", "the source volume server <host>:<port>")
targetNodeStr := volCopyCommand.String("target", "", "the target volume server <host>:<port>") targetNodeStr := volCopyCommand.String("target", "", "the target volume server <host>:<port>")
noLock := volCopyCommand.Bool("noLock", false, "do not lock the admin shell at one's own risk")
if err = volCopyCommand.Parse(args); err != nil { if err = volCopyCommand.Parse(args); err != nil {
return nil return nil
} }
if err = commandEnv.confirmIsLocked(args); err != nil {
if *noLock {
commandEnv.noLock = true
} else if err = commandEnv.confirmIsLocked(args); err != nil {
return return
} }

Loading…
Cancel
Save