mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
readiness returns error quickly if any of the set is down (#9662)
This PR adds a new configuration parameter which allows readiness check to respond within 10secs, this can be reduced to a lower value if necessary using ``` mc admin config set api ready_deadline=5s ``` or ``` export MINIO_API_READY_DEADLINE=5s ```
This commit is contained in:
@@ -165,13 +165,14 @@ func readServerConfig(ctx context.Context, objAPI ObjectLayer) (config.Config, e
|
||||
}
|
||||
}
|
||||
|
||||
var config = config.New()
|
||||
var srvCfg = config.New()
|
||||
var json = jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
if err = json.Unmarshal(configData, &config); err != nil {
|
||||
if err = json.Unmarshal(configData, &srvCfg); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return config, nil
|
||||
// Add any missing entries
|
||||
return srvCfg.Merge(), nil
|
||||
}
|
||||
|
||||
// ConfigSys - config system.
|
||||
|
||||
Reference in New Issue
Block a user