Skip to content

Commit

Permalink
Add logs when quorum is lost during readiness checks (minio#9839)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana authored Jun 15, 2020
1 parent 41a7938 commit a1e6a3e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/xl-zones.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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]++
Expand All @@ -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
}
}
Expand Down

0 comments on commit a1e6a3e

Please sign in to comment.