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

configuring root_host seems to have no effect for multi-part uploads [JIRA: RCS-318] #1288

Closed
sedninja opened this issue Jan 15, 2016 · 3 comments

Comments

@sedninja
Copy link

I am receiving invalid Location properties for objects uploaded using MultiPart upload functionality. My riak-cs.conf file contains the following configuration option

root_host = obs2.exampledomain.com

However, when I complete a multi-part upload, I receive an xml document with 4 values:

<CompleteMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <Location>$bucket_name.s3.amazonaws.com</Location>
  <Key>$file_name</Key>
  <Bucket>$bucket_name</Bucket>
  <Etag>"$etag"</Etag>
</CompleteMultipartUploadResult>

This appears to be due to how the object is created in src/riak_cs_wm_object_upload_part.erl on line 127.

                    XmlDoc = {'CompleteMultipartUploadResult',
                              [{'xmlns', "http://s3.amazonaws.com/doc/2006-03-01/"}],
                              [
                               %% TODO: use cs_root from app.config
                               {'Location', [lists:append(["http://", binary_to_list(Bucket), ".s3.amazonaws.com/", Key])]},
                               {'Bucket', [Bucket]},
                               {'Key', [Key]},
                               {'ETag', [ETag]}
                              ]
                             },

It looks like this issue has been present for a while based on the comment added in 2014. I have no experience with erlang, but I can see about updating the code to use the expected root_host if you want. Otherwise, do you have a timeline on when this might be corrected? It's no impacting me at this time, but it may affect users of the system if they rely on the "Location" that is returned after a multi-part upload.

@Basho-JIRA Basho-JIRA changed the title configuring root_host seems to have no effect for multi-part uploads configuring root_host seems to have no effect for multi-part uploads [JIRA: RCS-318] Jan 15, 2016
@shino shino added the Bug label Jan 19, 2016
@shino
Copy link
Contributor

shino commented Jan 19, 2016

@sedninja Thanks for reporting 😄 I'm sorry we don't have schedule to fix this. As you suggested, it will be easy to fix, so pull request from anyone is welcome.

@Basho-JIRA
Copy link

#1302

_[posted via JIRA by Ted Burghart]_

@Basho-JIRA
Copy link

Commit {{153da50}} merged into branch {{2.1}}

_[posted via JIRA by Ted Burghart]_

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

No branches or pull requests

5 participants