Merge pull request #752 from harshavardhana/pr_out_handle_removal_of_disks_getobject_now_reads_if_disks_are_missing_underneath_add_initial_stub_healing_code
Handle removal of disks - getObject() now reads if disks are missing underneath, add initial stub healing codemaster
commit
2e5e85d8ad
@ -0,0 +1,26 @@ |
||||
package donut |
||||
|
||||
import ( |
||||
"fmt" |
||||
|
||||
"github.com/minio/minio/pkg/iodine" |
||||
) |
||||
|
||||
// Heal heal an existing donut
|
||||
func (donut API) Heal() error { |
||||
missingDisks := make(map[int]struct{}) |
||||
for _, node := range donut.nodes { |
||||
disks, err := node.ListDisks() |
||||
if err != nil { |
||||
return iodine.New(err, nil) |
||||
} |
||||
for i, disk := range disks { |
||||
dirs, err := disk.ListDir(donut.config.DonutName) |
||||
if err != nil { |
||||
missingDisks[i] = struct{}{} |
||||
} |
||||
fmt.Println(dirs) |
||||
} |
||||
} |
||||
return nil |
||||
} |
Loading…
Reference in new issue