From c6b218e5df44e04eba640230459df9566dfeae5a Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 16 Jan 2020 13:49:25 -0800 Subject: [PATCH] fix: readiness should return 200 OK with first zone online (#8834) --- cmd/xl-zones.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/cmd/xl-zones.go b/cmd/xl-zones.go index 8e8c8e5c3..7215f36ac 100644 --- a/cmd/xl-zones.go +++ b/cmd/xl-zones.go @@ -1372,15 +1372,7 @@ func (z *xlZones) GetMetrics(ctx context.Context) (*Metrics, error) { return &Metrics{}, NotImplemented{} } -// IsReady - Returns True if all the zones have enough quorum to accept requests. +// IsReady - Returns true if first zone returns true func (z *xlZones) IsReady(ctx context.Context) bool { - if z.SingleZone() { - return z.zones[0].IsReady(ctx) - } - for _, xlsets := range z.zones { - if !xlsets.IsReady(ctx) { - return false - } - } - return true + return z.zones[0].IsReady(ctx) }