mirror of
https://github.com/minio/minio.git
synced 2025-02-03 01:46:00 -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 {
|
||||
Maintenance bool
|
||||
DeploymentType string
|
||||
Startup bool
|
||||
}
|
||||
|
||||
// HealthResult returns the current state of the system, also
|
||||
|
@ -921,14 +921,14 @@ func serverMain(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
bootstrapTrace("waitForQuorum", func() {
|
||||
result := newObject.Health(context.Background(), HealthOptions{Startup: true})
|
||||
for !result.Healthy {
|
||||
result := newObject.Health(context.Background(), HealthOptions{})
|
||||
for !result.HealthyRead {
|
||||
if debugNoExit {
|
||||
logger.Info("Not waiting for quorum since we are debugging.. possible cause unhealthy sets (%s)", result)
|
||||
break
|
||||
}
|
||||
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)
|
||||
result = newObject.Health(context.Background(), HealthOptions{})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user