Skip to content
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

Methods behave differently under Linux #1114

Open
Krm1t opened this issue Jun 26, 2024 · 5 comments
Open

Methods behave differently under Linux #1114

Krm1t opened this issue Jun 26, 2024 · 5 comments
Assignees

Comments

@Krm1t
Copy link

Krm1t commented Jun 26, 2024

Hello

edit: I just tried downgrading to version 5.0.0 and now things seem to work as expected.
It did of course require some changes to the code.

I'm unsure if i'm missing some linux related config or similar but i'm experiencing different behavior from various methods depending on whether i'm running on windows or linux.

Have reproduced this behavior in versions 6.0.2 and 6.0.3
running against the minio image: minio/minio:RELEASE.2024-04-18T19-09-19Z

I've attached a small project that tests BucketExistsAsync, GetObjectAsync and, PutObjectAsync.
Something as simple as BucketExistsAsync returns true whether or not the bucket exists.
I even found that if you use an invalid uri (say http://blablabla) when setting up the minio client, then BucketExistsAsync still work as if nothing is wrong - except that it takes longer because nothing is responding on that uri.

I tested against a Minio service running https, hosted in Kubernetes but docker-compose and http seem to work as well.
I recommend starting the minio container first and then open the web interface to create a bucket named "somevalidbucketname".
The name can be found and changed at the top of the Program.cs file.
Change the uri appropriately depending on whether running on your host (windows) or in the container (linux).
The swagger interface contains all 3 methods as simple get endpoints.
The test is more or less the same for all 3.
Call the endpoint and you should get a response back that shows the result (success) of the method called with both a valid and invalid bucket name.
For GetObject and PutObject you might also need to keep an eye on the log for console writeline messages.

On a side note: I ran into some bad behavior regarding exceptions being swallowed in the callback for GetObjectAsync.
I also happened upon some strange behavior with PutObjectAsync.
Do you want me to create separate issues for those?

Please let me know if you need anymore information or clarification.

MinioTest.zip

@ebozduman
Copy link
Collaborator

@Krm1t

This issue is a known problem from the previous release version 6.0.2 and a fix was introduced, tested and verified before 6.0.3 is released. So, it was supposed to be fixed in Minio version 6.0.3.
I also noticed the issue came back in 6.0.3 while testing the latest Minio package.
I am looking into it.
We'll use this issue to track it down.

@Krm1t
Copy link
Author

Krm1t commented Jun 27, 2024

@ebozduman Thanks for the quick response.
Am i correct in assuming that version 6.0.0 or 6.0.1 should work for now?
I'd rather not downgrade to 5.0.0 as it requires more changes to the code.

@ebozduman
Copy link
Collaborator

ebozduman commented Jun 27, 2024

@Krm1t

Yes, you are correct. 6.0.1 should be fine as far as the BucketExistsAsync issue goes.
Correction: The regression was actually introduced in 6.01 (PR#995). So, you need to go back to 6.0

@ebozduman
Copy link
Collaborator

@Krm1t

Could you clarify it for me one more time: Did you see the issue on Windows only?
If so, what is your Windows version?
Although a similar behavior I've seen once yesterday in my Linux setup, I just cannot reproduce it anymore. I think it was due to a rare timing issue for the RemoveBucketAsync method I've used in my test case.

@Krm1t
Copy link
Author

Krm1t commented Jun 28, 2024

@ebozduman With regards to the version, we ended up downgrading to 5.0
In our testing that was the only one that seemed to work as expected - At least in the features that we use.

As for clarification: Running on Windows seem to work.
Our problems only occur when our code is running inside a docker container, which is running Linux.
I haven't tested RemoveBucket, only BucketExistsAsync, GetObjectAsync and, PutObjectAsync.

  1. BucketExistsAsync : Always returns true, not matter what.
  2. GetObjectAsync : Don't fail on errors (like if the object don't exist) but instead returns an empty (default) ObjectStat instance and the callback is never called.
    Side note: Exceptions inside the callback seem to get swallowed by minio rather than being propagated up to the the code that called GetObjectAsync.
  3. PutObjectAsync : Seems to not upload the file to minio but also doesn't fail i.e. it looks like the file was uploaded successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants