-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deleting / Re-creating Bucket With Versioning Does Not Enable Versioning through Web Console #3483
Comments
I have created the following script (it assumes alias mc rb local/test --force
mc mb local/test
echo "test 1" | mc pipe local/test/test-object
mc version enable local/test
mc ls --versions local/test
echo "test 1" | mc pipe local/test/test-object
mc ls --versions local/test This is the output:
Versioning works fine. I'm not even sure if you can actually disable versioning when uploading data, but could you tell me which SDK you are using and how you're uploading the object that isn't versioned? You also may want to post the trace |
@ramondeklein to clarify, the issue I am experiencing only happens when the console web app is used, not the command line as per your test. I have recorded a youtube video that illustrates the steps and where the inconsistency is: https://youtu.be/lw41JBWDMYU Do let me know if you need any other information. For my testing I am using the latest c# sdk for .net 8. But we have also tested the latest node sdk. We don't believe this is the issue, but there's something wrong with the console web app. Do let me know if I've posted this issue to the wrong repo. Thanks! |
Hi @markive I've followed your steps and cannot reproduce, yes I used the console. Could you please repeat the steps using And also calls when you use your SDK code vs.
mc cp sample-cradle.jpg local/mybucket/sample-cradle.jpg
❯ mc ls --versions local/mybucket/sample-cradle.jpg
Done in console
❯ mc cp sample-cradle.jpg local/mybucket/sample-cradle.jpg
❯ mc ls --versions local/mybucket/sample-cradle.jpg
❯ mc cp sample-cradle.jpg local/mybucket/sample-cradle-2.jpg
❯ mc ls --versions local/mybucket/sample-cradle-2.jpg As you can see above the version id is correct. |
You can also compare the API calls made by the console and the calls made by the |
Just run it locally and see if you can reproduce on local machine with |
Hi @marktheunissen, thanks for looking into it. I don't have a linux system other than a containerized environment so I don't know how I can run I think focusing on the sdk shouldn't be the issue (we also tried with Node). Since versionId is controlled by minio, it should not be possible to successfully store an object (200 response) with versioning turned on through any means which results in versionId=null. This is the request made by the .Net SDK, it's a PUT always, and in fact all the SDKs minio provides don't support POST: Here is the API request that the console web app makes, it uses a POST even when uploading new versions of an existing file: |
I think the weirdest part of the behavior we are seeing is, why when a bucket is re-created does versioning not work, but when it is created for the first time with versioning turned on does it work perfectly? That's very inconsistent behavior and I'm 100% using the console web app for those operations. |
You can run |
Is this reproducible through |
@marktheunissen could you please try to reproduce this on the UI and with MC? and identify where the issue is happening. Thanks. |
@markive Can you please run MinIO on your local machine and see if this is reproducible with mc? |
@marktheunissen Did you try to reproduce this? It's a relative quick check for us to reproduce this issue. |
@ramondeklein Yes. You can read the steps I took in the comment I made in this ticket. Here is a direct link: #3483 (comment) OP @markive did not provide the custom code used in the original bug report. @markive also said it didn't matter because it was happening with nodejs and C#. So, without the custom code, I just used Neither could @cesnietor. Please be specific about what additional things you would like me to do, to try reproduce, given that I've already done the steps and shown the result above (#3483 (comment)) |
In this comment, @markive is trying to compare the Console web backend API, with the S3 API, and trying to reason about the differences - however this is a red herring, as these are two different APIs and it doesn't matter that one is PUT and one is POST. |
This should not be possible with a properly functioning filesystem, and it does not reproduce in my SNSD testing. We don't keep previously used bucket names on a list or anywhere that might result in them becoming "bricked" How did you confirm that there was no remaining reference? Did you look for all hidden files and folders including in
I went through just this specific part of the steps again. This does not reproduce. Recreating a bucket with the same name works as expected. @ramondeklein note the environment being used here: "We are running this as a Dockerised container in Azure Container Apps" The filesystem/environment is my primary suspect for this behavior, I don't know much about Azure Container Apps but it's like a serverless Lambda-type environment. Is it spawning multiple instances of the MinIO backend? Maybe it has created 2 or more replicas of MinIO expecting them to be stateless, and is simply load balancing requests to them. So the behaviour is weird and seemingly random, because you're actually talking to two or more different independent MinIOs? We just don't know, which is why I asked for reproduction on a SNSD first to isolate the issue Unless @markive comes back with more info I would close this as user environment issue. |
I am traveling today, but I will respond asap, it could be an environment issue, but Minio console/API/mc is not behaving consistently on it, or throwing errors, so it's worth pursuing, I think the environment I have set it up is a modern natural environment set of choices for people using Azure. |
Thanks
Maybe for general web apps on Azure, but it's not a supported or recommended environment for production deploy of MinIO. |
@marktheunissen In my previous assignment I have used Azure Container Apps too and it's just a bunch of Docker containers, but the persistent storage part is the part where it becomes interesting. But this seems like it's an Azure Containers Apps issue not playing nicely with MinIO. @markive Although we would love to make it work on all platforms, we simply cannot check each platform that our (open-source) customers are using. We simply lack the resources to do so. I hope you understand, but it would take too much time to recreate this on Azure Container Services ourselves and ensure we use the same as you have. This works fine using vanilla Docker and/or Kubernetes (also Azure's AKS), so we will close this issue. I do have a lot of Azure experience from the past. If you can provide me a Terraform script (or ARM template) that spins up an environment in a single namespace and provide the steps to reproduce, then I could take a look. For now I'm closing this issue... |
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)
Create bucket with versioning turned off.
Upload file through API (we used c# and node scripts to test)
You will have file with versionID=null
Turn on versioning for the bucket
Upload same file through API
You should have versionId set by MinIO
Upload new file through API
You will have file with versionID=null (this is wrong, bucket should version new files from now on).
Delete files and bucket completely through console web app
Re-create bucket with versioning turned on from the beginning
Follow steps above
Behavior is still incorrect
Delete files and bucket completely through console web app
Create same bucket with mb command with versioning enabled
Follow steps above
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
The text was updated successfully, but these errors were encountered: