diff --git a/cmd/erasure-server-pool.go b/cmd/erasure-server-pool.go index 03230a0a5..5b8b2a88c 100644 --- a/cmd/erasure-server-pool.go +++ b/cmd/erasure-server-pool.go @@ -2586,29 +2586,17 @@ func (z *erasureServerPools) Health(ctx context.Context, opts HealthOptions) Hea healthy := erasureSetUpCount[poolIdx][setIdx].online >= poolWriteQuorums[poolIdx] if !healthy { - if opts.Startup { - storageLogIf(logger.SetReqInfo(ctx, reqInfo), - fmt.Errorf("Write quorum was not established on pool: %d, set: %d, expected write quorum: %d", - poolIdx, setIdx, poolWriteQuorums[poolIdx]), logger.FatalKind) - } else { - storageLogIf(logger.SetReqInfo(ctx, reqInfo), - fmt.Errorf("Write quorum may be lost on pool: %d, set: %d, expected write quorum: %d", - poolIdx, setIdx, poolWriteQuorums[poolIdx]), logger.FatalKind) - } + storageLogIf(logger.SetReqInfo(ctx, reqInfo), + fmt.Errorf("Write quorum could not be established on pool: %d, set: %d, expected write quorum: %d, drives-online: %d", + poolIdx, setIdx, poolWriteQuorums[poolIdx], erasureSetUpCount[poolIdx][setIdx].online), logger.FatalKind) } result.Healthy = result.Healthy && healthy healthyRead := erasureSetUpCount[poolIdx][setIdx].online >= poolReadQuorums[poolIdx] if !healthyRead { - if opts.Startup { - storageLogIf(logger.SetReqInfo(ctx, reqInfo), - fmt.Errorf("Read quorum was not established on pool: %d, set: %d, expected read quorum: %d", - poolIdx, setIdx, poolReadQuorums[poolIdx])) - } else { - storageLogIf(logger.SetReqInfo(ctx, reqInfo), - fmt.Errorf("Read quorum may be lost on pool: %d, set: %d, expected read quorum: %d", - poolIdx, setIdx, poolReadQuorums[poolIdx])) - } + storageLogIf(logger.SetReqInfo(ctx, reqInfo), + fmt.Errorf("Read quorum could not be established on pool: %d, set: %d, expected read quorum: %d, drives-online: %d", + poolIdx, setIdx, poolReadQuorums[poolIdx], erasureSetUpCount[poolIdx][setIdx].online)) } result.HealthyRead = result.HealthyRead && healthyRead } diff --git a/cmd/main.go b/cmd/main.go index b8f572cc1..d53a124ed 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -189,12 +189,14 @@ func printMinIOVersion(c *cli.Context) { io.Copy(c.App.Writer, versionBanner(c)) } +var debugNoExit = env.Get("_MINIO_DEBUG_NO_EXIT", "") != "" + // Main main for minio server. func Main(args []string) { // Set the minio app name. appName := filepath.Base(args[0]) - if env.Get("_MINIO_DEBUG_NO_EXIT", "") != "" { + if debugNoExit { freeze := func(_ int) { // Infinite blocking op <-make(chan struct{}) diff --git a/cmd/server-main.go b/cmd/server-main.go index 075c9c482..024992d12 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -923,6 +923,10 @@ func serverMain(ctx *cli.Context) { bootstrapTrace("waitForQuorum", func() { result := newObject.Health(context.Background(), HealthOptions{Startup: true}) for !result.Healthy { + 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) time.Sleep(d)