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
rgw/CloudTransition: Transition objects to cloud endpoint #35100
Conversation
bb399f1
to
3df7c11
Compare
|
@yehudasa @mattbenjamin @cbodley @dang .. I have listed possible ways of configuring these cloud tier options (mainly to choose the right granularity - zonegroup/zone level) here - https://docs.google.com/document/d/1IoeITPCF64A5W-UA-9Y3Vp2oSfz3xVQHu31GTu3u3Ug/edit#heading=h.66scb8vgvd90 Please take a look and let me know your suggestions on which one seems fit for this use-case and if any changes/additions are required. Thanks! |
ba4fa7d
to
3e42059
Compare
2ca390f
to
9702f58
Compare
9702f58
to
2e983a1
Compare
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
unstale |
374e5e4
to
4add987
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
jenkins render docs |
f0a9e1e
to
633645b
Compare
633645b
to
2fd9594
Compare
|
jenkins test dashboard cephadm |
1 similar comment
|
jenkins test dashboard cephadm |
As mentioned in https://docs.google.com/document/d/1IoeITPCF64A5W-UA-9Y3Vp2oSfz3xVQHu31GTu3u3Ug/edit, the tier storage class will be configured at zonegroup level. So the existing CLI "radosgw-admin zonegroup placement add <id> --storage-class <class>" will be used to add tier storage classes as well but with extra tier-config options mentioned below - --tier-type : "cloud" --tier-config : [<key,value>,] These tier options are already defined to configure cloud sync module which are being reused here. TODO: * Add multipart options (if any , like part size, threshold) * Document * Test upgrade/downgrade Signed-off-by: Soumya Koduri <skoduri@redhat.com>
If the storage class configured is of cloud, transition the objects to remote endpoint configured. In case the object size is >mulitpart size limit (say 5M), upload the object into multiparts. As part of transition, map rgw attributes to http attrs, including ACLs. A new attribute (x-amz-meta-source: rgw) is added to denote that the object is transitioned from RGW source. Added two new options to tier-config to configure multipart size - * multipart_sync_threshold - determines the limit of object size, when exceeded transitioned in multiparts * multipart_min_part_size - the minimum size of the multipart upload part Default values for both the options is 32M and minimum value supported is 5M. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
After transitioning the object to cloud, following updates are done to the existing object. * In bi entry, change object category to CloudTiered * Update cloud-tier details (like endpoint, keys etc) in Object Manifest * Mark the tail objects expired to be deleted by gc TODO: * Update all the cloud config details including multiparts * Check if any other object metadata needs to be changed * Optimize to avoid using read_op again to read attrs. * Check for mtime to resolve conflicts when multiple zones try to transition obj Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Added a new option "retain_object" in tier_config which determines whether a cloud tiered object is deleted or if its head object is retained. By default the value is false i.e, the objects get deleted. XXX: verify that if Object is locked (ATTR_RETENTION), transition is not processed. Also check if the transition takes place separately for each version. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Store the status of multipart upload parts to verify if the object hasn't changed during the transition and if yes, abort the upload. Also avoid re-creating target buckets - Its not ideal to try creating target bucket for every object transition to cloud. To avoid it caching the bucket creations in a map with an expiry period set to '2*lc_debug_interval' for each entry. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Add class to fetch headers from remote endpoint and verify if the object is already tiered. & Few other fixes stated below - * Erase data in the head of cloud transitioned object * 'placement rm' command should erase tier_config details * A new option added in the object manifest to denote if the object is tiered in multiparts Signed-off-by: Soumya Koduri <skoduri@redhat.com>
As per https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html GET operation may fail with “InvalidObjectStateError” error if the object is in GLACIER or DEEP_ARCHIVE storage class and not restored. Same can apply for cloud tiered objects. However STAT/HEAD requests shall return the metadata stored. & misc fixes Signed-off-by: Soumya Koduri <skoduri@redhat.com>
…sses Tier type storage classes should not be allowed to have data pools & few other fixes/cleanup stated below - * If the tier_targets are not configured, do not dump them in the 'zonegroup get' command. * If not configured, by default a bucket of below name convention - "rgwx-$zonegroup-$storage_class-cloud-bucket" is created in the remote cloud endpoint to transition objects to. * Rename config option 'tier_storage_class' to 'target_storage_class'. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Also to avoid object name collisions across various buckets post cloud transition, add bucket name to the object prefix. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
If the object is versioned, to avoid objects getting overwritten post transition to cloud, append object versionID to the target object name Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Currently the transition is supported to cloud providers that are compatible with AWS/S3. Hence change the tier-type to cloud-s3 to configure the S3 style endpoint details. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
If an object is locked, skip its transition to cloud. @todo: Do we need special checks for bucket versioning too? If current, instead of deleting the data, do we need to create a delete marker? What about the case if retain_object is set to true. & misc rebase fixes Signed-off-by: Soumya Koduri <skoduri@redhat.com>
For versioned and locked objects, similar semantics as that of LifecycleExpiration are applied as stated below - If the bucket versioning is enabled and the object transitioned to cloud is - current version, irrespective of what the config option "retain_object" value is, the object is not deleted but instead delete marker is created on the source rgw server. - noncurrent version, it is deleted or retained based on the config option "retain_object" value. If the object is locked, and is - current version, it is transitioned to cloud post which it is made noncurrent with delete marker created. - noncurrent version, transition is skipped. Also misc rebase fixes and cleanup - * Rename config option to "retain_head_object" to reflect its functionality to keep head object post transitioning to cloud if enabled Signed-off-by: Soumya Koduri <skoduri@redhat.com>
With commit#81ad226, aws auth v4 rquires region name for remote endpoint connection. Include the same in the tier parameters. & misc fixes Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Similar to "get_resource()", add an API "send_resource()" to send PUT/POST/DELETE Stream request on RGWRestConn Signed-off-by: Soumya Koduri <skoduri@redhat.com>
To avoid the overhead of using coroutines during lifecycle transition, RGWRESTStream* APIs are used to transition objects to remote cloud. Also handled few optimizations and cleanup stated below: * Store the list of cloud target buckets as part of LCWorker instead of making it global. This list is maintained for the duration of RGWLC::process(), post which discarded. * Refactor code to remove coroutine based class definitions which are no longer needed and use direct function calls instead. * Check for cloud transitioned objects using tier-type and return error if accessed in RGWGetObj, RGWCopyObj and RGWPutObj ops. Signed-off-by: Soumya Koduri <skoduri@redhat.com>
bc9e07d
to
44317ea
Compare
|
jenkins test windows |
Feature PR: ceph/ceph#35100 Also ported lc testcases from boto2 to boto3 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Feature PR: ceph/ceph#35100 Also ported lc testcases from boto2 to boto3 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Feature PR: ceph/ceph#35100 Also ported lc testcases from boto2 to boto3 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Feature PR: ceph/ceph#35100 Also ported lc testcases from boto2 to boto3 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Feature PR: ceph/ceph#35100 Also ported lc testcases from boto2 to boto3 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Feature PR: ceph/ceph#35100 Also ported lc testcases from boto2 to boto3 (cherry picked from commit 47292ae) Signed-off-by: Soumya Koduri <skoduri@redhat.com>
This PR contains series of patches for CloudTiering/CloudTransition feature support (Experimental)
Feature Doc:
https://docs.google.com/document/d/1IoeITPCF64A5W-UA-9Y3Vp2oSfz3xVQHu31GTu3u3Ug/edit#heading=h.4o1xyas8s23x
Tier-config Options:
Tier storage class and the respective remote Cloud endpoint details can be configured via "zonegroup placement add <>" CLI.
Existing tier-type & tier-config options are used to configure the same. Below are the config options made available -
{
"access_key": ,
"secret": ,
"endpoint": ,
"region": "",
"host_style": <path | virtual>,
"acls": [ { "type": <id | email | uri>,
"source_id": <source_id>,
"dest_id": <dest_id> } ... ],
"target_path": <target_path>,
"target_storage_class": ,
"multipart_sync_threshold": {object_size},
"multipart_min_part_size": {part_size},
"retain_object": <true | false>
}
Object Transition:
Multisite:
To avoid multiple zones transitioning same object, each lc thread checks whether the target endpoint (cloud) already contains the object to be transitioned by issuing HEAD request and matching its mtime attr.
Test cases:
ceph/s3-tests#380
TODO:
To be handled in future:
Signed-off-by: Soumya Koduri skoduri@redhat.com