mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
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.
This commit is contained in:
parent
c07af89e48
commit
e3071157f0
@ -39,8 +39,10 @@ func (er erasureObjects) MakeBucketWithLocation(ctx context.Context, bucket stri
|
|||||||
defer NSUpdated(bucket, slashSeparator)
|
defer NSUpdated(bucket, slashSeparator)
|
||||||
|
|
||||||
// Verify if bucket is valid.
|
// Verify if bucket is valid.
|
||||||
if err := s3utils.CheckValidBucketNameStrict(bucket); err != nil {
|
if !isMinioMetaBucketName(bucket) {
|
||||||
return BucketNameInvalid{Bucket: bucket}
|
if err := s3utils.CheckValidBucketNameStrict(bucket); err != nil {
|
||||||
|
return BucketNameInvalid{Bucket: bucket}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
storageDisks := er.getDisks()
|
storageDisks := er.getDisks()
|
||||||
|
@ -962,8 +962,11 @@ func (z *erasureServerPools) StartDecommission(ctx context.Context, idx int) (er
|
|||||||
pathJoin(minioMetaBucket, minioConfigPrefix),
|
pathJoin(minioMetaBucket, minioConfigPrefix),
|
||||||
pathJoin(minioMetaBucket, bucketMetaPrefix),
|
pathJoin(minioMetaBucket, bucketMetaPrefix),
|
||||||
} {
|
} {
|
||||||
|
var bucketExists BucketExists
|
||||||
if err = z.MakeBucketWithLocation(ctx, metaBucket, BucketOptions{}); err != nil {
|
if err = z.MakeBucketWithLocation(ctx, metaBucket, BucketOptions{}); err != nil {
|
||||||
return err
|
if !errors.As(err, &bucketExists) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user