fix: readiness should return 200 OK with first zone online (#8834)

master
Harshavardhana 5 years ago committed by GitHub
parent c18fbdb29a
commit c6b218e5df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      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)
}

Loading…
Cancel
Save