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

Add --force-path-style flag to use path-style addressing. #92

Closed
wants to merge 1 commit into from

Conversation

joshuarobinson
Copy link

Many/most non-AWS object stores only support path-style addressing, but
recent changes switched to virtual-host addressing which broke access to
those object stores. This adds a flag to switch back to path style
addressing.

For more info, a virtual-host address looks like "http://bucketname.endpoint",
resulting in a DNS lookup. Path-style addressing looks like
"http://endpoint/bucketname" instead. The benefit of path-style
addressing is simplicity; you do not need to interact with DNS servers.

@joshuarobinson
Copy link
Author

First time submitting changes, so please let me know if I've missed anything (tests, etc?)

Recent changes broke access to our on-prem object store (see blog here)

Many/most non-AWS object stores only support path-style addressing, but
recent changes switched to virtual-host addressing which broke access to
those object stores. This adds a flag to switch back to path style
addressing.

For more info, a virtual-host address looks like "http://bucketname.endpoint",
resulting in a DNS lookup. Path-style addressing looks like
"http://endpoint/bucketname" instead. The benefit of path-style
addressing is simplicity; you do not need to interact with DNS servers.
@igungor
Copy link
Member

igungor commented Mar 17, 2020

Hi @joshuarobinson, thanks for the pull request! Also about the blog post, thank you very much for detailed review and your time 💯 . Much appreciated.

I'd like to know how do you access your on-prem object store? Is it like a minio installation? I'm asking this because may be we could drop the --force-path-style flag altogether by inferring the path-style from the endpoint URL. If it's not the official S3/Google etc. end point, we could use path-style instead of virtual-host-style.

@igungor igungor self-assigned this Mar 17, 2020
@joshuarobinson
Copy link
Author

joshuarobinson commented Mar 17, 2020 via email

igungor added a commit that referenced this pull request Mar 17, 2020
Otherwise fallback to path-style bucket name resolving.

Related: #92
@igungor
Copy link
Member

igungor commented Mar 17, 2020

Hey @joshuarobinson

I drafted a branch to showcase the approach I mentioned above. What do you think?

515e530

@joshuarobinson
Copy link
Author

joshuarobinson commented Mar 17, 2020 via email

@igungor
Copy link
Member

igungor commented Mar 17, 2020

Glad it works for you. I'll go ahead and merge that branch. Thanks again!

igungor added a commit that referenced this pull request Mar 17, 2020
Otherwise fallback to path-style bucket name resolving.

Related: #92
@igungor igungor closed this Mar 17, 2020
@joshuarobinson
Copy link
Author

joshuarobinson commented Mar 17, 2020 via email

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

Successfully merging this pull request may close these issues.

2 participants