mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -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:
@@ -434,6 +434,26 @@ func LookupWorm() (bool, error) {
|
||||
return ParseBool(env.Get(EnvWorm, EnableOff))
|
||||
}
|
||||
|
||||
// Merge - merges a new config with all the
|
||||
// missing values for default configs,
|
||||
// returns a config.
|
||||
func (c Config) Merge() Config {
|
||||
cp := New()
|
||||
for subSys, tgtKV := range c {
|
||||
for tgt := range tgtKV {
|
||||
ckvs := c[subSys][tgt]
|
||||
for _, kv := range cp[subSys][Default] {
|
||||
_, ok := c[subSys][tgt].Lookup(kv.Key)
|
||||
if !ok {
|
||||
ckvs.Set(kv.Key, kv.Value)
|
||||
}
|
||||
}
|
||||
cp[subSys][tgt] = ckvs
|
||||
}
|
||||
}
|
||||
return cp
|
||||
}
|
||||
|
||||
// New - initialize a new server config.
|
||||
func New() Config {
|
||||
srvCfg := make(Config)
|
||||
|
||||
Reference in New Issue
Block a user