diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-08-06 19:35:47 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-08-06 19:35:47 -0700 |
| commit | 0c0f77e2ae45e1f905d33bf9cf129667665121ab (patch) | |
| tree | a90a6c61ca070e58c6c8a7826079324df4ea63d0 | |
| parent | 8828f485c0193017307de67492681277062be0b8 (diff) | |
| download | seaweedfs-0c0f77e2ae45e1f905d33bf9cf129667665121ab.tar.xz seaweedfs-0c0f77e2ae45e1f905d33bf9cf129667665121ab.zip | |
skip not found error on deletion
| -rw-r--r-- | weed/shell/command_volume_tier_move.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/shell/command_volume_tier_move.go b/weed/shell/command_volume_tier_move.go index a3d7f2756..19a515dab 100644 --- a/weed/shell/command_volume_tier_move.go +++ b/weed/shell/command_volume_tier_move.go @@ -8,6 +8,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/wdclient" "io" "path/filepath" + "strings" "time" "github.com/chrislusf/seaweedfs/weed/storage/needle" @@ -136,7 +137,9 @@ func doVolumeTierMove(commandEnv *CommandEnv, writer io.Writer, vid needle.Volum for _, loc := range locations { if loc.Url != dst.dataNode.Id { if err = deleteVolume(commandEnv.option.GrpcDialOption, vid, loc.Url); err != nil { - fmt.Fprintf(writer, "failed to delete volume %d on %s: %v\n", vid, loc.Url, err) + if !strings.Contains(err.Error(), "not found") { + fmt.Fprintf(writer, "failed to delete volume %d on %s: %v\n", vid, loc.Url, err) + } } } } |
