mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
storage: Return errDiskNotFound when a peer is during shutdown (#15868)
This commit is contained in:
parent
bd3dfad8b9
commit
0506d9e83d
@ -25,6 +25,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -48,7 +49,10 @@ func isNetworkError(err error) bool {
|
|||||||
if nerr, ok := err.(*rest.NetworkError); ok {
|
if nerr, ok := err.(*rest.NetworkError); ok {
|
||||||
return xnet.IsNetworkOrHostDown(nerr.Err, false)
|
return xnet.IsNetworkOrHostDown(nerr.Err, false)
|
||||||
}
|
}
|
||||||
return false
|
|
||||||
|
// A peer node can be in shut down phase and proactively
|
||||||
|
// return 503 server closed error,consider it as an offline node
|
||||||
|
return err.Error() == http.ErrServerClosed.Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Converts network error to storageErr. This function is
|
// Converts network error to storageErr. This function is
|
||||||
|
Loading…
Reference in New Issue
Block a user