@ -56,18 +56,21 @@ func LivenessCheckHandler(w http.ResponseWriter, r *http.Request) {
return
return
}
}
s := objLayer . StorageInfo ( ctx )
if ! globalIsXL && ! globalIsDistXL {
// Gateways don't provide disk info, also handle special case for NAS gateway.
s := objLayer . StorageInfo ( ctx )
if s . Backend . Type == Unknown || s . Backend . Type == BackendFS {
// Gateways don't provide disk info.
// ListBuckets to confirm gateway backend is up
if s . Backend . Type == Unknown {
if _ , err := objLayer . ListBuckets ( ctx ) ; err != nil {
// ListBuckets to confirm gateway backend is up
writeResponse ( w , http . StatusServiceUnavailable , nil , mimeNone )
if _ , err := objLayer . ListBuckets ( ctx ) ; err != nil {
writeResponse ( w , http . StatusServiceUnavailable , nil , mimeNone )
return
}
writeResponse ( w , http . StatusOK , nil , mimeNone )
return
return
}
}
writeResponse ( w , http . StatusOK , nil , mimeNone )
return
}
}
// For FS and Erasure backend, check if local disks are up.
var totalLocalDisks int
var totalLocalDisks int
var erroredDisks int
var erroredDisks int
for _ , endpoint := range globalEndpoints {
for _ , endpoint := range globalEndpoints {