From a1e6a3ef647b08fc971c79c9140bb982c57e7f8b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 15 Jun 2020 13:03:16 -0700 Subject: [PATCH] Add logs when quorum is lost during readiness checks (#9839) --- cmd/xl-zones.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/xl-zones.go b/cmd/xl-zones.go index 12d6b7ef1..ad164117c 100644 --- a/cmd/xl-zones.go +++ b/cmd/xl-zones.go @@ -1608,7 +1608,7 @@ func (z *xlZones) getZoneAndSet(id string) (int, int, error) { } } } - return 0, 0, errDiskNotFound + return 0, 0, fmt.Errorf("ID(%s) %w", errDiskNotFound) } // IsReady - Returns true all the erasure sets are writable. @@ -1625,6 +1625,7 @@ func (z *xlZones) IsReady(ctx context.Context) bool { for _, id := range diskIDs { zoneIdx, setIdx, err := z.getZoneAndSet(id) if err != nil { + logger.LogIf(ctx, err) continue } erasureSetUpCount[zoneIdx][setIdx]++ @@ -1643,6 +1644,8 @@ func (z *xlZones) IsReady(ctx context.Context) bool { } for setIdx := range erasureSetUpCount[zoneIdx] { if erasureSetUpCount[zoneIdx][setIdx] < writeQuorum { + logger.LogIf(ctx, fmt.Errorf("Write quorum lost on zone: %d, set: %d, expected write quorum: %d", + zoneIdx, setIdx, writeQuorum)) return false } }