mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Fix error message when wrong set of disks are passed (#1634)
Previously when wrong set of disks are given with last minio server run, it throws unclear error message. This is fixed by returning appropriate errors. Fixes #1591
This commit is contained in:
parent
0e4e9c4bc1
commit
7264cd2ab3
@ -17,6 +17,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
router "github.com/gorilla/mux"
|
||||
@ -31,7 +32,11 @@ func newObjectLayer(exportPaths ...string) (ObjectLayer, error) {
|
||||
return newFSObjects(exportPath)
|
||||
}
|
||||
// Initialize XL object layer.
|
||||
return newXLObjects(exportPaths...)
|
||||
objAPI, err := newXLObjects(exportPaths...)
|
||||
if err == errWriteQuorum {
|
||||
return objAPI, errors.New("Disks are different with last minio server run.")
|
||||
}
|
||||
return objAPI, err
|
||||
}
|
||||
|
||||
// configureServer handler returns final handler for the http server.
|
||||
|
Loading…
Reference in New Issue
Block a user