Fix liveness check for NAS gateway (#7142)

Current master throws '503' unavailable for liveness check
```
~ curl -v http://localhost:9000/minio/health/live
> GET /minio/health/live HTTP/1.1
...
...
< HTTP/1.1 503 Service Unavailable
```

With this fix liveness check returns error appropriately
```
~ curl -v http://localhost:9000/minio/health/live
> GET /minio/health/live HTTP/1.1
...
...
< HTTP/1.1 200 OK
```
master
Harshavardhana 6 years ago committed by Nitish Tiwari
parent 8ee8ad777c
commit 964e354d06
  1. 8
      cmd/gateway/nas/gateway-nas.go

@ -17,6 +17,8 @@
package nas
import (
"context"
"github.com/minio/cli"
minio "github.com/minio/minio/cmd"
"github.com/minio/minio/pkg/auth"
@ -121,6 +123,12 @@ func (n *nasObjects) IsListenBucketSupported() bool {
return false
}
func (n *nasObjects) StorageInfo(ctx context.Context) minio.StorageInfo {
sinfo := n.ObjectLayer.StorageInfo(ctx)
sinfo.Backend.Type = minio.Unknown
return sinfo
}
// nasObjects implements gateway for Minio and S3 compatible object storage servers.
type nasObjects struct {
minio.ObjectLayer

Loading…
Cancel
Save