From 21fe5bde7cf0e619b4d9f2b2a15f8541988a646b Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 23 Apr 2019 23:58:52 -0700 Subject: [PATCH] filer: remove customizable grpc port, fixed to filer port + 10000 --- weed/command/filer.go | 7 +------ weed/command/s3.go | 2 -- weed/command/server.go | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/weed/command/filer.go b/weed/command/filer.go index f247d1c2a..4d6858cda 100644 --- a/weed/command/filer.go +++ b/weed/command/filer.go @@ -23,7 +23,6 @@ type FilerOptions struct { masters *string ip *string port *int - grpcPort *int publicPort *int collection *string defaultReplicaPlacement *string @@ -45,7 +44,6 @@ func init() { f.collection = cmdFiler.Flag.String("collection", "", "all data will be stored in this collection") f.ip = cmdFiler.Flag.String("ip", "", "filer server http listen ip address") f.port = cmdFiler.Flag.Int("port", 8888, "filer server http listen port") - f.grpcPort = cmdFiler.Flag.Int("port.grpc", 0, "filer grpc server listen port, default to http port + 10000") f.publicPort = cmdFiler.Flag.Int("port.readonly", 0, "readonly port opened to public") f.defaultReplicaPlacement = cmdFiler.Flag.String("defaultReplicaPlacement", "000", "default replication type if not specified") f.redirectOnRead = cmdFiler.Flag.Bool("redirectOnRead", false, "whether proxy or redirect to volume server during file GET request") @@ -140,10 +138,7 @@ func (fo *FilerOptions) startFiler() { } // starting grpc server - grpcPort := *fo.grpcPort - if grpcPort == 0 { - grpcPort = *fo.port + 10000 - } + grpcPort := *fo.port + 10000 grpcL, err := util.NewListener(":"+strconv.Itoa(grpcPort), 0) if err != nil { glog.Fatalf("failed to listen on grpc port %d: %v", grpcPort, err) diff --git a/weed/command/s3.go b/weed/command/s3.go index 9aa9f8e2f..aefbdbb8e 100644 --- a/weed/command/s3.go +++ b/weed/command/s3.go @@ -20,7 +20,6 @@ var ( type S3Options struct { filer *string - filerGrpcPort *int filerBucketsPath *string port *int domainName *string @@ -31,7 +30,6 @@ type S3Options struct { func init() { cmdS3.Run = runS3 // break init cycle s3options.filer = cmdS3.Flag.String("filer", "localhost:8888", "filer server address") - s3options.filerGrpcPort = cmdS3.Flag.Int("filer.grpcPort", 0, "filer server grpc port, default to filer http port plus 10000") s3options.filerBucketsPath = cmdS3.Flag.String("filer.dir.buckets", "/buckets", "folder on filer to store all buckets") s3options.port = cmdS3.Flag.Int("port", 8333, "s3options server http listen port") s3options.domainName = cmdS3.Flag.String("domainName", "", "suffix of the host name, {bucket}.{domainName}") diff --git a/weed/command/server.go b/weed/command/server.go index a56944b48..a5d2ddd21 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -80,7 +80,6 @@ func init() { serverOptions.cpuprofile = cmdServer.Flag.String("cpuprofile", "", "cpu profile output file") filerOptions.collection = cmdServer.Flag.String("filer.collection", "", "all data will be stored in this collection") filerOptions.port = cmdServer.Flag.Int("filer.port", 8888, "filer server http listen port") - filerOptions.grpcPort = cmdServer.Flag.Int("filer.port.grpc", 0, "filer grpc server listen port, default to http port + 10000") filerOptions.publicPort = cmdServer.Flag.Int("filer.port.public", 0, "filer server public http listen port") filerOptions.defaultReplicaPlacement = cmdServer.Flag.String("filer.defaultReplicaPlacement", "", "Default replication type if not specified during runtime.") filerOptions.redirectOnRead = cmdServer.Flag.Bool("filer.redirectOnRead", false, "whether proxy or redirect to volume server during file GET request")