rgw/cloud-restore [PART1] : Add Restore support from Glacier/Tape cloud endpoints#61745
rgw/cloud-restore [PART1] : Add Restore support from Glacier/Tape cloud endpoints#61745
Conversation
| } | ||
|
|
||
| bool is_tier_type_s3() { | ||
| return (tier_type == "cloud-s3" || tier_type == "cloud-s3-glacier"); |
There was a problem hiding this comment.
IMO better to seperate them out
There was a problem hiding this comment.
We would still need one common routine for all s3-* style tier types as most of the S3 endpoint options and processing would be common. And there is already one defined for just "glacier" below to use when needed specific to glacier
61d2bd5 to
4963de8
Compare
src/rgw/rgw_sal.h
Outdated
|
|
||
| /** Get the type of this tier */ | ||
| virtual const std::string& get_tier_type() = 0; | ||
| /** Is the type of this tier cloud-s3/clous-s3-glacier */ |
src/rgw/driver/rados/rgw_lc_tier.cc
Outdated
|
|
||
| /* Read object or just head from remote endpoint. | ||
| */ | ||
| int rgw_cloud_tier_restore_object(RGWLCCloudTierCtx& tier_ctx, bool head, |
There was a problem hiding this comment.
head is not used in this function, rgw_cloud_tier_get_object() with a boolean value directly
src/rgw/driver/rados/rgw_rados.cc
Outdated
| RGWRadosPutObj cb(dpp, cct, plugin, compressor, &processor, progress_cb, progress_data, | ||
| [&](map<string, bufferlist> obj_attrs) { | ||
| // XXX: do we need filter() like in fetch_remote_obj() cb | ||
| // XXX: do we need filter() lke in fetch_remote_obj() cb |
src/rgw/driver/rados/rgw_rados.cc
Outdated
| * for permanent restore | ||
| */ | ||
| dest_placement.storage_class = RGW_STORAGE_CLASS_STANDARD; | ||
| // dest_placement.storage_class = RGW_STORAGE_CLASS_STANDARD; |
There was a problem hiding this comment.
what will be the storage in this case?
There was a problem hiding this comment.
It is now updated in Line:5281 above. A new option "restore_storage_class" is added (default:STANDARD) to configure restored object storage-class.
thotz
left a comment
There was a problem hiding this comment.
Minor comments overall LGTM, saw two swap files related to vim in PR
Thanks. Addressed them. |
4963de8 to
05e4bbd
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
05e4bbd to
a3d412a
Compare
a3d412a to
d4241c4
Compare
|
jenkins test make check |
|
jenkins test make check |
ivancich
left a comment
There was a problem hiding this comment.
Whenever I see so many duplicates of hard-coded strings, I think that argues for a macro (old style) or (better) (static const or static constexpr). That avoids potential minor typo-issues and allows the compiler to do some checking.
A few that I noticed:
- "cloud-s3-glacier"
- "cloud-s3"
- "glacier_restore_days"
- "restore_storage_class"
src/rgw/driver/rados/rgw_lc_tier.cc
Outdated
|
|
||
| if (!s.empty()){ | ||
| const char *r_str = "ongoing-request=\"true\""; | ||
| char *found = strstr((char*)s.c_str(), r_str); |
There was a problem hiding this comment.
nit -- why is there a cast to (char*)? strstr takes a const char* as a parameter and that's what c_str() returns.
src/rgw/rgw_zone_types.h
Outdated
| o.back()->tier_type = "cloud-s3"; | ||
| o.back()->storage_class = "STANDARD"; | ||
| o.back()->allow_read_through = false; | ||
| o.back()->restore_storage_class = "STANDARD"; |
There was a problem hiding this comment.
Since you have a macro RGW_STORAGE_CLASS_STANDARD for this, maybe use it instead of hard-coding the string here and a few lines above. (I realize you're just duplicating the local coding style.)
d4241c4 to
6ffe699
Compare
Thanks Eric. I have addressed string literals "cloud-s3-glacier" and "cloud-s3" as suggested above in |
Unlike regular S3 cloud services, restoring objects from S3/Tape or AWS Glacier services would require special handling. We need to first restore the object using Glacier `RestoreObject` API and then download it using `GET`. https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html A new cloud tier-type `s3-glacier` is added to handle S3 Glacier endpoints along with below tier-config options - `glacier_restore_days` - lifetime of the restored copy on the Glacier endpoint ; default: 1 day `glacier_restore_tier_type` - Retrieval tier at which the restore will be processed. Only "Standard" (default) and "Expedited" options are supported. In addition, a new option `restore_storage_class` is added to configure the storage class the objects need to be restored to. Default value: STANDARD Design doc: https://docs.google.com/document/d/1rzLJAzHK6cLuzJswgoplgugNOFCKi8NrjPOGfgVrIFg/edit?tab=t.0#heading=h.sgrmb31roboc Signed-off-by: Soumya Koduri <[email protected]>
Signed-off-by: Soumya Koduri <[email protected]>
Unlike regular S3 cloud services, restoring objects from S3/Tape or AWS Glacier services would require special handling. We need to first restore the object using Glacier RestoreObject API and then download it using GET. https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html This PR adds that support for "Expedited" tier retrieval type. That means the restore would be quick and the object can be downloaded soon. TODO: "Standard" tier-type support. Need to handle the case where in restore from cloud endpoint could take a longer time and need to be monitored periodically in the background. Signed-off-by: Soumya Koduri <[email protected]>
6ffe699 to
300f643
Compare
|
jenkins test api |
1 similar comment
|
jenkins test api |
|
jenkins test api |
This commit fixes an undetected merge conflict between PRs ceph#61745 and ceph#60159. The dencoding problem has been introduced very recently, it is straightforward and causes failures of the make check bot everywhere, therefore -- if no objections -- I want to merge this patch without the Teuthology testing. Signed-off-by: Radoslaw Zarzynski <[email protected]>
| ENCODE_START(3, 1, bl); | ||
| ENCODE_START(4, 1, bl); |
There was a problem hiding this comment.
@soumyakoduri @thotz please note the fix for this in #62515 (has this been backported?)
There was a problem hiding this comment.
No. This feature is not present in squid upstream release. (Yet to be backported into downstream though.)
There was a problem hiding this comment.
Yet to be backported into downstream though
okay, thanks - just wanted to make sure we don't miss the fix downstream
There was a problem hiding this comment.
yes. Thank you! We weren't aware of this issue till now.
This PR is the first in a series of enhancements to the restore feature, adding support for S3 Glacier cloud services.
Design doc: https://docs.google.com/document/d/1rzLJAzHK6cLuzJswgoplgugNOFCKi8NrjPOGfgVrIFg/edit?tab=t.0#heading=h.sgrmb31roboc
Unlike regular S3 cloud services, restoring objects from S3/Tape or AWS Glacier services would require special handling. We need to first restore the object using Glacier
RestoreObjectAPI and then download it usingGET.https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html
This PR handles below support -
A new cloud tier-type
s3-glacieris added to handle S3 Glacier endpoints along with below tier-config options -glacier_restore_days- lifetime of the restored copy on the Glacier endpoint ; default: 1 dayglacier_restore_tier_type- Retrieval tier at which the restore will be processed.Only "Standard" (default) and "Expedited" options are supported.
In addition, a new option
restore_storage_classis added to configure the storage class the objects need to be restored to. Default value: STANDARDThis PR handles "Expedited" tier retrieval type. That means the cases where in restore would be quick and the object can be downloaded soon.
TODO: "Standard" tier-type support. Need to handle the case where in restore from cloud endpoint could take a longer time and need to be monitored periodically in the background.
TODO: Update cloud-transition doc & add tests.
Note: The first commit is already part of #61569 and will be rebased once merged.
Fixes: https://tracker.ceph.com/issues/68012
Signed-off-by: Soumya Koduri [email protected]
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 windowsjenkins test rook e2e