mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-08-25 17:14:15 +08:00
Refactoring volume server options.
This commit is contained in:
parent
ef191f2901
commit
09bc196958
@ -71,6 +71,7 @@ func runVolume(cmd *Command, args []string) bool {
|
|||||||
}
|
}
|
||||||
runtime.GOMAXPROCS(*v.maxCpu)
|
runtime.GOMAXPROCS(*v.maxCpu)
|
||||||
|
|
||||||
|
//Set multiple folders and each folder's max volume count limit'
|
||||||
v.folders = strings.Split(*volumeFolders, ",")
|
v.folders = strings.Split(*volumeFolders, ",")
|
||||||
maxCountStrings := strings.Split(*maxVolumeCounts, ",")
|
maxCountStrings := strings.Split(*maxVolumeCounts, ",")
|
||||||
for _, maxString := range maxCountStrings {
|
for _, maxString := range maxCountStrings {
|
||||||
@ -88,10 +89,13 @@ func runVolume(cmd *Command, args []string) bool {
|
|||||||
glog.Fatalf("Check Data Folder(-dir) Writable %s : %s", folder, err)
|
glog.Fatalf("Check Data Folder(-dir) Writable %s : %s", folder, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//security related white list configuration
|
||||||
if *volumeWhiteListOption != "" {
|
if *volumeWhiteListOption != "" {
|
||||||
v.whiteList = strings.Split(*volumeWhiteListOption, ",")
|
v.whiteList = strings.Split(*volumeWhiteListOption, ",")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//derive default public ip address
|
||||||
if *v.publicIp == "" {
|
if *v.publicIp == "" {
|
||||||
if *v.ip == "" {
|
if *v.ip == "" {
|
||||||
*v.ip = "127.0.0.1"
|
*v.ip = "127.0.0.1"
|
||||||
@ -109,7 +113,7 @@ func runVolume(cmd *Command, args []string) bool {
|
|||||||
*v.fixJpgOrientation,
|
*v.fixJpgOrientation,
|
||||||
)
|
)
|
||||||
|
|
||||||
listeningAddress := *v.ip + ":" + strconv.Itoa(*v.port)
|
listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port)
|
||||||
|
|
||||||
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "at", listeningAddress)
|
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "at", listeningAddress)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user