shell: do not need to lock to see volume -h

This commit is contained in:
Chris Lu
2021-09-13 22:13:34 -07:00
parent 7504be58f9
commit 119d5908dd
23 changed files with 92 additions and 93 deletions

View File

@@ -44,10 +44,6 @@ func (c *commandVolumeServerEvacuate) Help() string {
func (c *commandVolumeServerEvacuate) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
if err = commandEnv.confirmIsLocked(); err != nil {
return
}
vsEvacuateCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
volumeServer := vsEvacuateCommand.String("node", "", "<host>:<port> of the volume server")
skipNonMoveable := vsEvacuateCommand.Bool("skipNonMoveable", false, "skip volumes that can not be moved")
@@ -57,6 +53,10 @@ func (c *commandVolumeServerEvacuate) Do(args []string, commandEnv *CommandEnv,
return nil
}
if err = commandEnv.confirmIsLocked(); err != nil {
return
}
if *volumeServer == "" {
return fmt.Errorf("need to specify volume server by -node=<host>:<port>")
}