mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
objectLayer: Check for format.json in a wrapped disk. (#3311)
This is needed to validate if the `format.json` indeed exists when a fresh node is brought online. This wrapped implementation also connects to the remote node by attempting a re-login. Subsequently after a successful connect `format.json` is validated as well. Fixes #3207
This commit is contained in:
@@ -135,7 +135,7 @@ func TestXLDeleteObjectDiskNotFound(t *testing.T) {
|
||||
// for a 16 disk setup, quorum is 9. To simulate disks not found yet
|
||||
// quorum is available, we remove disks leaving quorum disks behind.
|
||||
for i := range xl.storageDisks[:7] {
|
||||
xl.storageDisks[i] = newNaughtyDisk(xl.storageDisks[i].(*posix), nil, errFaultyDisk)
|
||||
xl.storageDisks[i] = newNaughtyDisk(xl.storageDisks[i].(*retryStorage), nil, errFaultyDisk)
|
||||
}
|
||||
err = obj.DeleteObject(bucket, object)
|
||||
if err != nil {
|
||||
@@ -195,7 +195,7 @@ func TestGetObjectNoQuorum(t *testing.T) {
|
||||
}
|
||||
for i := range xl.storageDisks[:9] {
|
||||
switch diskType := xl.storageDisks[i].(type) {
|
||||
case *posix:
|
||||
case *retryStorage:
|
||||
xl.storageDisks[i] = newNaughtyDisk(diskType, diskErrors, errFaultyDisk)
|
||||
case *naughtyDisk:
|
||||
xl.storageDisks[i] = newNaughtyDisk(diskType.disk, diskErrors, errFaultyDisk)
|
||||
@@ -246,7 +246,7 @@ func TestPutObjectNoQuorum(t *testing.T) {
|
||||
}
|
||||
for i := range xl.storageDisks[:9] {
|
||||
switch diskType := xl.storageDisks[i].(type) {
|
||||
case *posix:
|
||||
case *retryStorage:
|
||||
xl.storageDisks[i] = newNaughtyDisk(diskType, diskErrors, errFaultyDisk)
|
||||
case *naughtyDisk:
|
||||
xl.storageDisks[i] = newNaughtyDisk(diskType.disk, diskErrors, errFaultyDisk)
|
||||
|
||||
Reference in New Issue
Block a user