diff options
| author | Bl1tz23 <alex3angle@gmail.com> | 2021-08-10 13:45:24 +0300 |
|---|---|---|
| committer | Bl1tz23 <alex3angle@gmail.com> | 2021-08-10 13:45:24 +0300 |
| commit | 1c94b3d01340baad000188550fcf2ccab6ca80e5 (patch) | |
| tree | 12c3da17eb2d1a43fef78021a3d7c79110b0ff5f /weed/shell/command_volume_server_evacuate.go | |
| parent | e6e57db530217ff57b3622b4672b03ebb6313e96 (diff) | |
| parent | f9cf9b93d32a2b01bc4d95ce7d24d86ef60be668 (diff) | |
| download | seaweedfs-1c94b3d01340baad000188550fcf2ccab6ca80e5.tar.xz seaweedfs-1c94b3d01340baad000188550fcf2ccab6ca80e5.zip | |
merge master, resolve conflicts
Diffstat (limited to 'weed/shell/command_volume_server_evacuate.go')
| -rw-r--r-- | weed/shell/command_volume_server_evacuate.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/weed/shell/command_volume_server_evacuate.go b/weed/shell/command_volume_server_evacuate.go index f21d0334c..6e0c19ae1 100644 --- a/weed/shell/command_volume_server_evacuate.go +++ b/weed/shell/command_volume_server_evacuate.go @@ -52,6 +52,7 @@ func (c *commandVolumeServerEvacuate) Do(args []string, commandEnv *CommandEnv, volumeServer := vsEvacuateCommand.String("node", "", "<host>:<port> of the volume server") skipNonMoveable := vsEvacuateCommand.Bool("skipNonMoveable", false, "skip volumes that can not be moved") applyChange := vsEvacuateCommand.Bool("force", false, "actually apply the changes") + retryCount := vsEvacuateCommand.Int("retry", 0, "how many times to retry") if err = vsEvacuateCommand.Parse(args); err != nil { return nil } @@ -60,7 +61,13 @@ func (c *commandVolumeServerEvacuate) Do(args []string, commandEnv *CommandEnv, return fmt.Errorf("need to specify volume server by -node=<host>:<port>") } - return volumeServerEvacuate(commandEnv, *volumeServer, *skipNonMoveable, *applyChange, writer) + for i := 0; i < *retryCount+1; i++ { + if err = volumeServerEvacuate(commandEnv, *volumeServer, *skipNonMoveable, *applyChange, writer); err == nil { + return nil + } + } + + return } |
