Repository navigation
rgw/cloud: Add custom headers for objects transitioned to cloud - #50098
Conversation
|
@cbodley @mattbenjamin @yehudasa please let me know if these new headers added seem ok. If yes will add update the document https://docs.ceph.com/en/latest/radosgw/cloud-transition/#object-modification-limitations as well. Also shall I add these headers for cloud synced objects as well? |
is there a reason to distinguish between |
|
@cbodley are these even user visible attributes, or ones that we keep internally? |
these rgwx attrs aren't stored in rgw's objects, but cloud transition is adding them to the objects we write to remote s3: it doesn't look like the idea is that we should be able to someday transition these objects back to rgw in their original form |
Right! Cloud tier should not be skipping any original object attrs. I will test that case and update. Thanks! |
@soumyakoduri i don't think that's a blocker for progress here; maybe just drop the |
3e8ecc3 to
3eecafb
Compare
3eecafb to
192755d
Compare
Done. I even addressed this bug of not copying "x-amz-" attrs in this PR. Please review. |
There was a problem hiding this comment.
Maybe expand attrs to attributes?
And s/all the//
There was a problem hiding this comment.
Done. Thanks! Please review.
936c3f0 to
41de07b
Compare
There was a problem hiding this comment.
there's a boost::algorithm::istarts_with() that looks perfect for this
There was a problem hiding this comment.
I observed that user defined attrs are stored with extra 'user-' prefix in RGW (for eg., user-x-amz-meta-key1). So I used std::strstr here to split and fetch only the original key (x-amz-meta-key1) to be added as header.
Some of the cloud services, (like MCG Noobaa/Azure Namespace store), may not be able to map and store the objects which contain s3 style metadata keys. To help such services determine if the objects being transitioned are from RGW and whether or not ignore such attrs, added below two headers for the objects being copied/transitioned from RGW - 1) x-rgw-cloud : true/false (set to "true" if the object is being transitioned/synced from RGW) 2) x-rgw-cloud-keep-attrs : true/false - if set to default "true" , the cloud service should store all the x-amz-meta-* attrs. If cannot be mapped/stored, the operation should fail - if set to "false", the destination cloud can ignore such attrs and just store the object data being sent. Also fixed a bug in the cloudtier module wherein the user-defined attrs were not being copied to the cloud endpoint as part of transition Fixes: https://tracker.ceph.com/issues/57980 Fixes: https://tracker.ceph.com/issues/58796 Signed-off-by: Soumya Koduri <[email protected]>
41de07b to
9c3264f
Compare
|
jenkins render docs |
|
👍 the full suite might take a while. is there any interesting test coverage we're missing from the rgw/cloud-transition suite above? if not, i'm fine with merging based on that |
|
p.s. please use the public "pulpito.ceph.com" links instead of "pulpito.front.sepia.ceph.com" so people without vpn access can view the results! |
Thanks Casey! Updated the links. |
Some of the cloud services, (like MCG Noobaa/Azure Namespace store), may not be able to map and store the objects which contain s3 style metadata keys.
To help such services determine if the objects being transitioned are from RGW and whether or not ignore such attrs, added below two headers for the objects being copied/transitioned from RGW -
x-rgw-cloud : true/false
(set to "true" if the object is being transitioned/synced from RGW)
x-rgw-cloud-keep-attrs : true/false
Also fixed a bug in the cloudtier module wherein the user-defined attrs were not being copied to the cloud endpoint as part of transition
Signed-off-by: Soumya Koduri [email protected]
Fixes: https://tracker.ceph.com/issues/57980
Fixes:https://tracker.ceph.com/issues/58796
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows