diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index bccc9577a..14de46e68 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -291,7 +291,7 @@ func (api objectAPIHandlers) DeleteMultipleObjectsHandler(w http.ResponseWriter, deletedObjects = append(deletedObjects, object) continue } - if _, ok := err.(ObjectNotFound); ok { + if _, ok := errorCause(err).(ObjectNotFound); ok { // If the object is not found it should be // accounted as deleted as per S3 spec. deletedObjects = append(deletedObjects, object) diff --git a/cmd/format-config-v1_test.go b/cmd/format-config-v1_test.go index f4879f51d..2981193ff 100644 --- a/cmd/format-config-v1_test.go +++ b/cmd/format-config-v1_test.go @@ -262,8 +262,13 @@ func prepareFormatXLHealFreshDisks(obj ObjectLayer) ([]StorageAPI, error) { } func TestFormatXLHealFreshDisks(t *testing.T) { + nDisks := 16 + fsDirs, err := getRandomDisks(nDisks) + if err != nil { + t.Fatal(err) + } // Create an instance of xl backend. - obj, fsDirs, err := getXLObjectLayer() + obj, err := getXLObjectLayer(fsDirs) if err != nil { t.Error(err) } @@ -289,8 +294,13 @@ func TestFormatXLHealFreshDisks(t *testing.T) { } func TestFormatXLHealFreshDisksErrorExpected(t *testing.T) { + nDisks := 16 + fsDirs, err := getRandomDisks(nDisks) + if err != nil { + t.Fatal(err) + } // Create an instance of xl backend. - obj, fsDirs, err := getXLObjectLayer() + obj, err := getXLObjectLayer(fsDirs) if err != nil { t.Error(err) } @@ -568,8 +578,13 @@ func TestSavedUUIDOrder(t *testing.T) { // Test initFormatXL() when disks are expected to return errors func TestInitFormatXLErrors(t *testing.T) { + nDisks := 16 + fsDirs, err := getRandomDisks(nDisks) + if err != nil { + t.Fatal(err) + } // Create an instance of xl backend. - obj, fsDirs, err := getXLObjectLayer() + obj, err := getXLObjectLayer(fsDirs) if err != nil { t.Fatal(err) } diff --git a/cmd/naughty-disk_test.go b/cmd/naughty-disk_test.go index 088c40a4f..8060d0de0 100644 --- a/cmd/naughty-disk_test.go +++ b/cmd/naughty-disk_test.go @@ -16,6 +16,8 @@ package cmd +import "github.com/minio/minio/pkg/disk" + // naughtyDisk wraps a POSIX disk and returns programmed errors // specified by the developer. The purpose is to simulate errors // that are hard to simulate in practise like DiskNotFound. @@ -46,6 +48,13 @@ func (d *naughtyDisk) calcError() (err error) { return nil } +func (d *naughtyDisk) DiskInfo() (info disk.Info, err error) { + if err := d.calcError(); err != nil { + return info, err + } + return d.disk.DiskInfo() +} + func (d *naughtyDisk) MakeVol(volume string) (err error) { if err := d.calcError(); err != nil { return err diff --git a/cmd/server-main.go b/cmd/server-main.go index 663a538fb..7d5ea217f 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -85,8 +85,7 @@ EXAMPLES: /mnt/export3/ /mnt/export4/ /mnt/export5/ /mnt/export6/ /mnt/export7/ \ /mnt/export8/ /mnt/export9/ /mnt/export10/ /mnt/export11/ /mnt/export12/ - 6. Start minio server with 4 remote disks on all remote nodes. You need to execute the same command on all nodes - 192.168.1.11, 192.168.1.12, 192.168.1.13 and 192.168.1.14. + 6. Start minio server on a 4 node distributed setup. Type the following command on all the 4 nodes. $ export MINIO_ACCESS_KEY=minio $ export MINIO_SECRET_KEY=miniostorage $ minio {{.Name}} 192.168.1.11:/mnt/export/ 192.168.1.12:/mnt/export/ \