SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
mount: add a bit retry when connecting to filer during startup
Chris Lu40dc5ac90470
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.goindex 6eb836311b..8da69d0ac1 100644--- a/weed/command/mount_std.go+++ b/weed/command/mount_std.go@@ -63,16 +63,23 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {// try to connect to filer, filerBucketsPath may be useful latergrpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client")var cipher bool- err = pb.WithGrpcFilerClient(filerGrpcAddress, grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {- resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{})+ for i := 0; i < 10; i++ {+ err = pb.WithGrpcFilerClient(filerGrpcAddress, grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {+ resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{})+ if err != nil {+ return fmt.Errorf("get filer grpc address %s configuration: %v", filerGrpcAddress, err)+ }+ cipher = resp.Cipher+ return nil+ })if err != nil {- return fmt.Errorf("get filer grpc address %s configuration: %v", filerGrpcAddress, err)+ glog.V(0).Infof("failed to talk to filer %s: %v", filerGrpcAddress, err)+ glog.V(0).Infof("wait for %d seconds ...", i+1)+ time.Sleep(time.Duration(i+1)*time.Second)}- cipher = resp.Cipher- return nil- })+ }if err != nil {- glog.Infof("failed to talk to filer %s: %v", filerGrpcAddress, err)+ glog.Errorf("failed to talk to filer %s: %v", filerGrpcAddress, err)return true}