|
@ -127,6 +127,7 @@ func (s3opt *S3Options) startS3Server() bool { |
|
|
|
|
|
|
|
|
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client") |
|
|
grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client") |
|
|
|
|
|
|
|
|
|
|
|
for { |
|
|
err = withFilerClient(filerGrpcAddress, grpcDialOption, func(client filer_pb.SeaweedFilerClient) error { |
|
|
err = withFilerClient(filerGrpcAddress, grpcDialOption, func(client filer_pb.SeaweedFilerClient) error { |
|
|
resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{}) |
|
|
resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{}) |
|
|
if err != nil { |
|
|
if err != nil { |
|
@ -137,8 +138,12 @@ func (s3opt *S3Options) startS3Server() bool { |
|
|
return nil |
|
|
return nil |
|
|
}) |
|
|
}) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
glog.Fatal(err) |
|
|
|
|
|
return false |
|
|
|
|
|
|
|
|
glog.V(0).Infof("wait to connect to filer %s grpc address %s", *s3opt.filer, filerGrpcAddress) |
|
|
|
|
|
time.Sleep(time.Second) |
|
|
|
|
|
} else { |
|
|
|
|
|
glog.V(0).Infof("connected to filer %s grpc address %s", *s3opt.filer, filerGrpcAddress) |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
router := mux.NewRouter().SkipClean(true) |
|
|
router := mux.NewRouter().SkipClean(true) |
|
|