Can't perform PutObject operation #738
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#738
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thank you very much for garage! Previously, I was using minio with
aws-sdk-s3
in Rust. Now, I am attempting to transition to garage, but my previous code that was working no longer functions correctly. In this code snippet, I am trying to upload a file to an S3 bucket namedmustore-data
with the keyreceived/user1:886773de-cc58-4d2b-81bb-b4db05349817:avatar.png
:However, the output I received indicates an error:
The issue is that
received/
is being interpreted as a bucket name instead of a virtual directory as intended.Also, if I use ':' instead of '/', with key 'received:user1:524bb5c8-c585-4123-b36a-1257d826325b:avatar.png', I got:
Please, how would I fix that?
There are two style of URLs in AWS S3: path-style and dns-style. Here, Garage is expecting a path-style URL, where the fist component is the name of the bucket, but your client is sending a dns-style request, where the bucket name is supposed to be part of the host name. Configure your client to use path style (the option is variously called use_path_style or force_path_style) and it should work.
@lx, That works, thanks you very much!
Hi!
Looks like I have similar issue but force_path_style(true) does not help:
Any ideas?
@Mako Your problem seems to be on the CreateBucket endpoint, so it would be better to open a different issue to discuss it.
To answer your question, it looks like the SDK you are using is adding a parameter in the CreateBucket request that Garage does not support. We would need to dump the XML that your client is sending to Garage to see what it contains and why Garage considers it invalid, and then either take the additionnal parameters into account (if applicable), or more likely, just ignore it.