mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-09 02:04:45 +08:00
shell: volume.tier.move makes up changes if volume move failed
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/chrislusf/seaweedfs/weed/wdclient"
|
||||
"io"
|
||||
"log"
|
||||
"time"
|
||||
@@ -190,3 +191,13 @@ func markVolumeWritable(grpcDialOption grpc.DialOption, volumeId needle.VolumeId
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
func markVolumeReplicasWritable(grpcDialOption grpc.DialOption, volumeId needle.VolumeId, locations []wdclient.Location, writable bool) error {
|
||||
for _, location := range locations {
|
||||
fmt.Printf("markVolumeReadonly %d on %s ...\n", volumeId, location.Url)
|
||||
if err:= markVolumeWritable(grpcDialOption, volumeId, location.Url, writable); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user