filer: default filer store directory

1. set default filer store directory
2. set peers, avoiding empty string counted as 1.
This commit is contained in:
Chris Lu
2020-07-07 23:06:48 -07:00
parent 3c269da37f
commit a2eb680f34
2 changed files with 17 additions and 11 deletions

View File

@@ -103,6 +103,11 @@ func (fo *FilerOptions) startFiler() {
defaultLevelDbDirectory = *fo.defaultLevelDbDirectory + "/filerldb2"
}
var peers []string
if *fo.peers != "" {
peers = strings.Split(*fo.peers, ",")
}
fs, nfs_err := weed_server.NewFilerServer(defaultMux, publicVolumeMux, &weed_server.FilerOption{
Masters: strings.Split(*fo.masters, ","),
Collection: *fo.collection,
@@ -116,7 +121,7 @@ func (fo *FilerOptions) startFiler() {
Host: *fo.ip,
Port: uint32(*fo.port),
Cipher: *fo.cipher,
Filers: strings.Split(*fo.peers, ","),
Filers: peers,
})
if nfs_err != nil {
glog.Fatalf("Filer startup error: %v", nfs_err)