Skip to content

Deleting / Re-creating Bucket With Versioning Does Not Enable Versioning through Web Console #3483

@markive

Description

@markive

We are testing MinIO, and the first test we did was to create a bucket without versioning (to look at file structures on disk). Then we wanted to test versioning so we turned it on. We found that our bucket wasn't creating files with version IDs (versionID = null) when uploaded through the API.

When we created a new bucket with versioning turned on from the beginning everything was as expected.

We therefore deleted the original bucket (by deleting all objects and versions first) all in the console and re-created it through the console with versioning turned on. We then found we got the same incorrect behaviour. So it seems like we have 'bricked' that bucket name. I was able to confirm there is no reference to the original bucket name on the file storage.

Another weird behavior is that objects uploaded through the API have this problem, but objects uploaded through the console web app do get a version ID for the first object version.

The only way to resolve the issue is to manually create the bucket using the command line:
mc mb --with-versioning local/mark-voffon-test Bucket created successfully 'local/mark-voffon-test'.

Expected Behavior

When you re-create a bucket with versioning, it should work when using the console web app. It should have the same behavior as the command line.

Current Behavior

Objects behave like they were first uploaded to a bucket with versioning turned off, and on a second object upload you get a version ID.

The console web app isn't re-creating a deleted bucket with versioning turned on the same as the command line.

Video link demonstrating the issue: https://youtu.be/lw41JBWDMYU

Steps to Reproduce (for bugs)

  1. Create bucket with versioning turned off.

  2. Upload file through API (we used c# and node scripts to test)

  3. You will have file with versionID=null

  4. Turn on versioning for the bucket

  5. Upload same file through API

  6. You should have versionId set by MinIO

  7. Upload new file through API

  8. You will have file with versionID=null (this is wrong, bucket should version new files from now on).

  9. Delete files and bucket completely through console web app

  10. Re-create bucket with versioning turned on from the beginning

  11. Follow steps above

  12. Behavior is still incorrect

  13. Delete files and bucket completely through console web app

  14. Create same bucket with mb command with versioning enabled

  15. Follow steps above

  16. Everything works according to the documentation.

Regression

I assume yes
We are running the latest version as of a few days ago.

Your Environment

We are running this as a Dockerised container in Azure Container Apps

  • MinIO version used (minio --version):
    minio version RELEASE.2024-11-07T00-52-20Z (commit-id=cefc43e4daa4cbb490ef6726ea374e26a93eb85e)
    Runtime: go1.23.3 linux/amd64
    License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html
    Copyright: 2015-2024 MinIO, Inc.

  • Operating System and version (uname -a):
    Linux rdrive-minio-ea--fh4gz0c-768ff885d5-8hxtt 5.15.164.1-1.cm2 Profiling endpoints for mcs #1 SMP Sun Aug 18 19:16:21 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions