From 7264cd2ab391842c3eae405a6e7764b72fbf842e Mon Sep 17 00:00:00 2001 From: Bala FA Date: Sat, 14 May 2016 11:34:10 +0530 Subject: [PATCH] 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 --- routers.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routers.go b/routers.go index 39afda7f7..70bb6dc32 100644 --- a/routers.go +++ b/routers.go @@ -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.