From 64662a49ff6fb9b50f05f1df24f81fa960435588 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Mon, 8 Mar 2021 19:54:13 +0100 Subject: [PATCH] heal: Heal bucket metadata when a fresh disk is inserted (#11734) Replacing disk with a fresh one never heals bucket metadata (policy, notification, etc..). This commit fixes the issue. --- cmd/background-newdisks-heal-ops.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/background-newdisks-heal-ops.go b/cmd/background-newdisks-heal-ops.go index 36c398940..48f89944f 100644 --- a/cmd/background-newdisks-heal-ops.go +++ b/cmd/background-newdisks-heal-ops.go @@ -375,6 +375,12 @@ func monitorLocalDisksAndHeal(ctx context.Context, z *erasureServerPools, bgSeq Name: pathJoin(minioMetaBucket, minioConfigPrefix), }) + // Buckets data are dispersed in multiple zones/sets, make + // sure to heal all bucket metadata configuration. + buckets = append(buckets, []BucketInfo{ + {Name: pathJoin(minioMetaBucket, bucketMetaPrefix)}, + }...) + // Heal latest buckets first. sort.Slice(buckets, func(i, j int) bool { a, b := strings.HasPrefix(buckets[i].Name, minioMetaBucket), strings.HasPrefix(buckets[j].Name, minioMetaBucket)