aboutsummaryrefslogtreecommitdiff
path: root/weed/command/master_follower.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-03-17 14:57:07 -0700
committerGitHub <noreply@github.com>2022-03-17 14:57:07 -0700
commit01c48da6ce0ecb685c29a8e734f962bfb0cf8e97 (patch)
tree1dd0c5539e1cbe12b9411656679cf650c4948921 /weed/command/master_follower.go
parent4042fdf3bb5dc9cab2f6df3911819678bbf03e01 (diff)
parent7ee38fa3a4ba4e849e77bde8a7356b299f9d4f7b (diff)
downloadseaweedfs-01c48da6ce0ecb685c29a8e734f962bfb0cf8e97.tar.xz
seaweedfs-01c48da6ce0ecb685c29a8e734f962bfb0cf8e97.zip
Merge pull request #2765 from bercknash/berck/fix_default_ips
The fixes for https://github.com/chrislusf/seaweedfs/issues/1937 had …
Diffstat (limited to 'weed/command/master_follower.go')
-rw-r--r--weed/command/master_follower.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/weed/command/master_follower.go b/weed/command/master_follower.go
index 502ce3cd3..f182d7ce4 100644
--- a/weed/command/master_follower.go
+++ b/weed/command/master_follower.go
@@ -3,17 +3,18 @@ package command
import (
"context"
"fmt"
+ "net/http"
+ "time"
+
"github.com/aws/aws-sdk-go/aws"
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb"
"github.com/chrislusf/seaweedfs/weed/pb/master_pb"
"github.com/chrislusf/seaweedfs/weed/security"
- "github.com/chrislusf/seaweedfs/weed/server"
+ weed_server "github.com/chrislusf/seaweedfs/weed/server"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/gorilla/mux"
"google.golang.org/grpc/reflection"
- "net/http"
- "time"
)
var (
@@ -45,13 +46,13 @@ var cmdMasterFollower = &Command{
Short: "start a master follower",
Long: `start a master follower to provide volume=>location mapping service
- The master follower does not participate in master election.
+ The master follower does not participate in master election.
It just follow the existing masters, and listen for any volume location changes.
In most cases, the master follower is not needed. In big data centers with thousands of volume
servers. In theory, the master may have trouble to keep up with the write requests and read requests.
- The master follower can relieve the master from from read requests, which only needs to
+ The master follower can relieve the master from from read requests, which only needs to
lookup a fileId or volumeId.
The master follower currently can handle fileId lookup requests:
@@ -112,7 +113,7 @@ func startMasterFollower(masterOptions MasterOptions) {
option.IsFollower = true
if *masterOptions.ipBind == "" {
- *masterOptions.ipBind = "localhost"
+ *masterOptions.ipBind = *masterOptions.ip
}
r := mux.NewRouter()