use master.toml value if not empty
fix https://github.com/seaweedfs/seaweedfs/issues/6922
This commit is contained in:
@@ -3,13 +3,14 @@ package command
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util/version"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/seaweedfs/seaweedfs/weed/util/version"
|
||||||
|
|
||||||
hashicorpRaft "github.com/hashicorp/raft"
|
hashicorpRaft "github.com/hashicorp/raft"
|
||||||
|
|
||||||
"slices"
|
"slices"
|
||||||
@@ -111,6 +112,11 @@ func runMaster(cmd *Command, args []string) bool {
|
|||||||
util.LoadSecurityConfiguration()
|
util.LoadSecurityConfiguration()
|
||||||
util.LoadConfiguration("master", false)
|
util.LoadConfiguration("master", false)
|
||||||
|
|
||||||
|
// bind viper configuration to command line flags
|
||||||
|
if v := util.GetViper().GetString("master.mdir"); v != "" {
|
||||||
|
*m.metaFolder = v
|
||||||
|
}
|
||||||
|
|
||||||
grace.SetupProfiling(*masterCpuProfile, *masterMemProfile)
|
grace.SetupProfiling(*masterCpuProfile, *masterMemProfile)
|
||||||
|
|
||||||
parent, _ := util.FullPath(*m.metaFolder).DirAndName()
|
parent, _ := util.FullPath(*m.metaFolder).DirAndName()
|
||||||
|
|||||||
Reference in New Issue
Block a user