From e3071157f0b23d005196f91730e899f68fec0120 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 14 Mar 2022 11:25:24 -0700 Subject: [PATCH] allow MakeBucketLocation to work for metaBucket (#14548) decommission would fail to start due to failure in MakeBucketLocation() error on .minio.sys/ bucket creation. Allow these special buckets. --- cmd/erasure-bucket.go | 6 ++++-- cmd/erasure-server-pool-decom.go | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/erasure-bucket.go b/cmd/erasure-bucket.go index 763e2291e..058eeeb58 100644 --- a/cmd/erasure-bucket.go +++ b/cmd/erasure-bucket.go @@ -39,8 +39,10 @@ func (er erasureObjects) MakeBucketWithLocation(ctx context.Context, bucket stri defer NSUpdated(bucket, slashSeparator) // Verify if bucket is valid. - if err := s3utils.CheckValidBucketNameStrict(bucket); err != nil { - return BucketNameInvalid{Bucket: bucket} + if !isMinioMetaBucketName(bucket) { + if err := s3utils.CheckValidBucketNameStrict(bucket); err != nil { + return BucketNameInvalid{Bucket: bucket} + } } storageDisks := er.getDisks() diff --git a/cmd/erasure-server-pool-decom.go b/cmd/erasure-server-pool-decom.go index bd44ebe79..06c594015 100644 --- a/cmd/erasure-server-pool-decom.go +++ b/cmd/erasure-server-pool-decom.go @@ -962,8 +962,11 @@ func (z *erasureServerPools) StartDecommission(ctx context.Context, idx int) (er pathJoin(minioMetaBucket, minioConfigPrefix), pathJoin(minioMetaBucket, bucketMetaPrefix), } { + var bucketExists BucketExists if err = z.MakeBucketWithLocation(ctx, metaBucket, BucketOptions{}); err != nil { - return err + if !errors.As(err, &bucketExists) { + return err + } } }