-
Notifications
You must be signed in to change notification settings - Fork 133
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
feature: add support for S3 Express #225 #228
Conversation
Hi @hveiga thank you so much for this contribution! I am going to make time to review/test tomorrow and get back to you with any comments. |
So I'm still learning more about s3 Express and will be setting up a test for myself in the coming days to make sure I can review this properly. However after reading the PR I think there are some things for us to discuss:
So basically I'd like to dig in a bit to the changes in the hostname used in signing to make sure they are necessary (I couldn't find any docs that noted this but I could very well be missing soemthing). If they are we may need to restructure some of the logic in the Your introduction of the |
All your concerns are valid and agree with them. To be honest I am not too keen on this approach I presented but I wanted to get some progress going. Let me add some insights to your points:
I am not too familiar with |
Thanks for the quick follow up @hveiga - sounds like our next task is to compare our understanding of the requirements for connection. I'm going to do some testing myself and report back then we can compare notes. This might take me a day or two but I'll try to prioritize it - very much appreciate your involvement in bringing this feature to the gateway |
Hi @hveiga so I set up S3 Express One Zone bucket and I was able to confirm that we are actually able to use it without any changes to the gateway code. I've documented my findings here: Can you take a look and see if the described configuration works for your use case? In the process, I learned some things about the gateway code that might be relevant:
I think at this point if we have a way of using the express zone product with the gateway then documenting it can be our first step. I'm trying to limit the number of additional configuration variables to the project until I have a chance to do a bigger refactor of how the project works. However, if there are any smaller usability changes we can make to improve the experience for s3 express please let me know |
I tried what you are suggesting on #229 but unfortunately it does not seem to work for my bucket. To eliminate potential issues, I recreated the bucket with a different name and I double checked I can access it with my AWS credentials but still I get the same With debug enabled, I can see the host is incorrect (
For completeness, I am running If we can have this working with no changes, that would be the best. Thank you for looking into this. |
Hey so I just tested this again using the build you mentioned and was able to get it to work. I don't see an issue with the config you posted. I definitely am open to the possibility I'm missing something in my process, but looking at the error you're getting I am suspicious that the code from this pull request is involved. Here's the diff from your modified
Which would result in the bucket name being included twice if it's added as part of the |
I ran the changes from a fresh folder only having the settings file and running docker locally. Same result unfortunately. One problem I see is the line If we have:
Then
Can you check on your side what is the value of |
That's a good point. That code sets the I pushed up some changes here: #229 so that we can go back to not including the s3 bucket in the In case it helps, here are the commands I'm using:
Note that the If you receive any errors - can you let me know the exact error message? It's still strange to me that I'm seeing this work and you are not. I may have some others also test to see if I'm missing some obvious misconfiguration on my test setup. |
Finally working! I can confirm that with the changes in #229 it works for me. I also verified that a regular S3 General buckets works as well with those changes. I'll leave a couple comments on the PR. Thanks for looking into this, greatly appreciated. |
Thank you for taking the time to work through this with me and testing it out. I'm going to adjust my PR to productionalize this then ask you for some review. I'll respond to your feedback in the other PR |
I am closing this in favor of #229 . |
These changes aim to bring support for S3 Express directory buckets #225 .
Overall the required changes are the following:
s3express
instead ofs3
.default.conf
needs to use the full bucket + server url, for example:upstreams.conf
needs to use the full bucket + server url as well, for example:This PR does not implement the new session based S3 Express auth model to speed up requests.
I am looking for some guidance on how this should be implemented. I introduced a new env var
S3_SERVICE
and based on it the code is conditionally replacingdefault.conf
andupstreams.conf
. I am not sure if this is the approach that is desired but happy to receive feedback on it.Also, when running tests by doing
./test.sh oss
I am getting2024/04/12 18:25:15 [emerg] 1#1: SyntaxError: "awscredentials" has already been declared in /etc/nginx/:3
and I am not sure how to pass that issue.