mirror of
https://github.com/minio/minio.git
synced 2025-02-03 09:55:59 -05:00
allow server startup to come online with READ success (#19957)
This commit is contained in:
parent
bce93b5cfa
commit
2825294b7b
@ -2425,7 +2425,6 @@ const (
|
|||||||
type HealthOptions struct {
|
type HealthOptions struct {
|
||||||
Maintenance bool
|
Maintenance bool
|
||||||
DeploymentType string
|
DeploymentType string
|
||||||
Startup bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HealthResult returns the current state of the system, also
|
// HealthResult returns the current state of the system, also
|
||||||
|
@ -921,14 +921,14 @@ func serverMain(ctx *cli.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bootstrapTrace("waitForQuorum", func() {
|
bootstrapTrace("waitForQuorum", func() {
|
||||||
result := newObject.Health(context.Background(), HealthOptions{Startup: true})
|
result := newObject.Health(context.Background(), HealthOptions{})
|
||||||
for !result.Healthy {
|
for !result.HealthyRead {
|
||||||
if debugNoExit {
|
if debugNoExit {
|
||||||
logger.Info("Not waiting for quorum since we are debugging.. possible cause unhealthy sets (%s)", result)
|
logger.Info("Not waiting for quorum since we are debugging.. possible cause unhealthy sets (%s)", result)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
d := time.Duration(r.Float64() * float64(time.Second))
|
d := time.Duration(r.Float64() * float64(time.Second))
|
||||||
logger.Info("Waiting for quorum healthcheck to succeed.. possible cause unhealthy sets (%s), retrying in %s", result, d)
|
logger.Info("Waiting for quorum READ healthcheck to succeed.. possible cause unhealthy sets (%s), retrying in %s", result, d)
|
||||||
time.Sleep(d)
|
time.Sleep(d)
|
||||||
result = newObject.Health(context.Background(), HealthOptions{})
|
result = newObject.Health(context.Background(), HealthOptions{})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user