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
```
This commit is contained in:
Harshavardhana 2019-01-24 19:14:05 +05:30 committed by Nitish Tiwari
parent 8ee8ad777c
commit 964e354d06

View File

@ -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