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
quincy: rgw: fix multipart upload object leaks due to re-upload #51976
Conversation
cf7ea4e
to
5ed8009
Compare
5ed8009
to
19662d9
Compare
0af1b9a
to
e0cb791
Compare
jenkins retest this please |
In downstream 4.1 version this change moved rgw_pool, rgw_bucket, and some related types--but these have already moved on more recent branches. Include rgw_basic_types.h only from cls_rgw_types.h (review). Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Signed-off-by: Daniel Gryniewicz <dang@redhat.com> (cherry picked from commit 9ee09fc)
Defines a hierarchy of "simple" data types ensured to be safe to include in any context above the zipper line, and also from CLS. The following headers are currently defined to contain basic types only: rewrite src/rgw/rgw_basic_types.h (70%) // includes the whole hierarchy create mode 100644 src/rgw/rgw_acl_types.h create mode 100644 src/rgw/rgw_bucket_types.h create mode 100644 src/rgw/rgw_obj_types.h create mode 100644 src/rgw/rgw_placement_types.h create mode 100644 src/rgw/rgw_pool_types.h create mode 100644 src/rgw/rgw_quota_types.h create mode 100644 src/rgw/rgw_user_types.h create mode 100644 src/rgw/rgw_zone_types.h This commit consolidates the following original commits: * rgw: move RGWUploadPartInfo to rgw_basic_types.{h,cc} * rgw: move rgw_obj_key to rgw_basic_types.{h,cc} * rgw: move rgw_placement_rule to rgw_basic_types.{h,cc} * rgw: move rgw_obj to rgw_basic_types.{h,cc} * rgw: include rgw_compression_types.h in rgw_basic_types.{h,cc} * rgw: move rgw_raw_obj to rgw_basic_types.{h,cc} * rgw: rgw_multi.h: remove unused RGWMPObj forward decl and the following cleanups from review: * rgw: remove stray comments * rgw: move rgw_obj_manifest.h inclusion to top of rgw_basic_types.h * rgw: nit: indentation * rgw: remove this line * rgw: move rgw_bucket_shard to rgw_bucket_types.h, cleanup * rgw: fix rgw_quota.h Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Signed-off-by: Daniel Gryniewicz <dang@redhat.com> (cherry picked from commit c30449b) Conflicts: src/rgw/driver/rados/rgw_user.cc (different file location, necessary changes already there) src/rgw/rgw_basic_types.h (rgw_bucket_key, rgw_bucket: had to remove manually, no idea why automatic merge failed, the structs seem the same) src/rgw/rgw_common.h (missing comment about RGWObjVersionTracker: had to remove rgw_raw_obj manually; rgw_obj: had to remove manually, no idea why automatic merge failed, the structs seem the same) src/rgw/rgw_quota.h (struct RGWQuota missing) src/rgw/rgw_zone.h (different file location, struct RGWZonePlacementInfo v8 vs v7, struct RGWZone v7 vs v8) src/rgw/rgw_zone_features.h (zone features not available)
This commit fixes the object leaks when an mp part object is re-uploaded. Details of the fix are: 1. Upon re-upload, remember the prefix used in previous part upload in a new field "past_prefixes" in RGWUploadPartInfo. 2. Create a new CLS function for updating part info in the metadata object. 3. Utilize the new CLS function during mp upload. 4. At the upload conclusion (compete/abort), clean up the part objects that are not used for the final assembly, thus preventing the object leak. Fixes: https://tracker.ceph.com/issues/16767 Signed-off-by: Yixin Jin <yjin77@yahoo.ca> (cherry picked from commit 2ac63de) Conflicts: src/rgw/rgw_sal_rados.cc (trivial) src/cls/rgw/cls_rgw.cc (use std::set 'count' instead of 'contains', cls_get_object_info not available)
1. Replace the ugly dynamic_cast with the call of obj_to_raw() to access the raw meta obj. Fixes: https://tracker.ceph.com/issues/16767 Signed-off-by: Yixin Jin <yjin77@yahoo.ca> (cherry picked from commit 4cc0db6)
1. Use librados::ObjectWriteOperation to implement the async CLS call. 2. Change the call to use the async CLS call. 3. Style update to be compliant Signed-off-by: Yixin Jin <yjin77@yahoo.ca> (cherry picked from commit 9996b02)
e0cb791
to
d82fa08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the backport. this is blocked on test coverage in #50667, so we'll need to get that working and included here for validation
With #50667 merged, can this move forward to a release? |
Runs a boto script that reuploads one part multiple times before completing and then we check for any orphans. Original boto script contributed by Matt Benjamin <mbenjami@redhat.com> on top of which modifications were made. Signed-off-by: J. Eric Ivancich <ivancich@redhat.com> (cherry picked from commit aeffd1b)
Hi guys |
jenkins test api |
jenkins test make check |
Hello! What is the current status of the backport fix? We're observing it on our clusters and waiting for quincy backport. |
hey @prazumovsky, since this didn't make the 17.2.7 release, it will be tested when we're ready to do 17.2.8. that will happen after 18.2.1 and 16.2.15 |
jenkins test make check |
jenkins test make check |
backport tracker: https://tracker.ceph.com/issues/59065
backport of #49709 #50667
parent tracker: https://tracker.ceph.com/issues/16767
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh