From f1cab828eeaa6dbbb9d1eba2bf9715e470d552e2 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Tue, 24 Aug 2021 15:40:56 +0100 Subject: [PATCH] fix: New disks healing should pick unformatted disks as well (#13054) A recent regression caused new disks not being re-formatted. In the old code, a disk needed be 'online' to be chosen to be formatted but the disk has to be already formatted for XL storage IsOnline() function to return true. It is enough to check if XL storage is nil or not if we want to avoid formatting root disks. Co-authored-by: Anis Elleuch --- .github/workflows/go.yml | 1 + cmd/format-erasure.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 386e06305..432b65e99 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -32,3 +32,4 @@ jobs: sudo sysctl net.ipv6.conf.all.disable_ipv6=0 sudo sysctl net.ipv6.conf.default.disable_ipv6=0 make verify + make verify-healing diff --git a/cmd/format-erasure.go b/cmd/format-erasure.go index dd8a0d022..795ff1d8c 100644 --- a/cmd/format-erasure.go +++ b/cmd/format-erasure.go @@ -705,7 +705,7 @@ func saveUnformattedFormat(ctx context.Context, storageDisks []StorageAPI, forma if format == nil { continue } - if storageDisks[index] != nil && storageDisks[index].IsOnline() { + if storageDisks[index] != nil { if err := saveFormatErasure(storageDisks[index], format, true); err != nil { return err }