minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

`mc rb --force --dangerous` says bucket deletion successful, but bucket remains #4865

Open binaryfire opened 8 months ago

binaryfire commented 8 months ago

I can't seem to delete non-empty buckets after updating to the latest versions of mc and minio.

Eg. mc rb --force --dangerous app/public says Removed 'app/public' successfully but when I do mb ls app the bucket (and all its contents) is still there.

I'm running this as part of an automated script that I haven't changed. The only change I've made is updating the mc and minio binaries. Everything was working prior to the update.

PS. If the bucket is empty, deletion works as expected.

shtripat commented 8 months ago

I tried with minio version RELEASE.2024-02-26T09-33-48Z and mc version RELEASE.2024-02-24T01-33-20Z and can't simulate this issue. The bucket gets deleted as expected.

$ mc mb m1/test-bucket 
Bucket created successfully `m1/test-bucket`.

$ mc cp /etc/issue m1/test-bucket/
/etc/issue:                     28 B / 28 B ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.32 KiB/s 0s

$ mc cp /etc/hosts m1/test-bucket/ 
/etc/hosts:                     1.05 KiB / 1.05 KiB ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 166.04 KiB/s 0s

$ mc ls m1/test-bucket/
[2024-03-01 17:05:06 IST] 1.0KiB STANDARD hosts
[2024-03-01 17:05:00 IST]    28B STANDARD issue

$ mc rb --force --dangerous m1/test-bucket/
Removed `m1/test-bucket/` successfully.

$ mc ls m1/test-bucket/ 
mc: <ERROR> Unable to list folder. The specified bucket does not exist

$ mc ls m1
$
harshavardhana commented 8 months ago

It is mainly some on-disk issue @shripat