|
@ -130,13 +130,15 @@ func maybeStartMetrics(fs *FilerServer, option *FilerOption) { |
|
|
var metricsIntervalSec int |
|
|
var metricsIntervalSec int |
|
|
var readErr error |
|
|
var readErr error |
|
|
for !isConnected { |
|
|
for !isConnected { |
|
|
metricsAddress, metricsIntervalSec, readErr = readFilerConfiguration(fs.grpcDialOption, option.Masters[0]) |
|
|
|
|
|
|
|
|
for _, master := range option.Masters { |
|
|
|
|
|
metricsAddress, metricsIntervalSec, readErr = readFilerConfiguration(fs.grpcDialOption, master) |
|
|
if readErr == nil { |
|
|
if readErr == nil { |
|
|
isConnected = true |
|
|
isConnected = true |
|
|
} else { |
|
|
} else { |
|
|
time.Sleep(7 * time.Second) |
|
|
time.Sleep(7 * time.Second) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
if metricsAddress == "" && metricsIntervalSec <= 0 { |
|
|
if metricsAddress == "" && metricsIntervalSec <= 0 { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|