Repository navigation
rgw: fix CopyObj crash after admin override - #50648
Conversation
the CopyObject request is issued against the destination bucket/object, so refer directly to s->bucket and s->object instead of creating separate dst_bucket and dst_object handles Signed-off-by: Casey Bodley <[email protected]>
the bucket_instance_id gets parsed from the "rgwx-bucket-instance" header, and corresponds to the destination bucket. don't reuse it for the src_bucket, whose name either comes from the s3 header "x-amz-copy-source" or the swift header "x-copy-from" Signed-off-by: Casey Bodley <[email protected]>
if `RGWCopyObj::verify_permissions()` returns an error, it may leave some zipper objects uninitialized. when the user has admin or system privileges, we'll ignore that error and call `execute()` anyway. this moves the initialization into `RGWCopyObj::init_processing()` instead Fixes: https://tracker.ceph.com/issues/58035 Signed-off-by: Casey Bodley <[email protected]>
|
the first commit "dont duplicate sal handles in RGWCopyObj" was enough to resolve the crash on null |
|
@mattbenjamin i requested your review for the rgw_file change; qa/workunits/rgw/test_librgw_file.sh still passes so i think it's correct |
| state->src_bucket_name = src_parent->bucket_name(); | ||
| state->bucket_name = dst_parent->bucket_name(); | ||
|
|
||
| std::string dest_obj_name = dst_parent->format_child_name(dst_name, false); |
| @@ -5345,45 +5345,30 @@ int RGWCopyObj::verify_permission(optional_yield y) | |||
|
|
|||
| RGWAccessControlPolicy dest_bucket_policy(s->cct); | |||
|
|
|||
There was a problem hiding this comment.
assuming this is correct, it's certainly easier to understand
| ret = driver->get_bucket(dpp, nullptr, | ||
| rgw_bucket(s->src_tenant_name, | ||
| s->src_bucket_name, | ||
| s->bucket_instance_id), |
There was a problem hiding this comment.
what effect did this mix-up have?
There was a problem hiding this comment.
it probably never mattered. we only set bucket_instance_id if the request included an "rgwx-bucket-instance" header, and we removed multisite's last use of that with the resharding changes. it had only been used for bucket listings, not copies
mkogan1
left a comment
There was a problem hiding this comment.
confirming solves the segfault in both known repro cases
- copy existing obj over itself
- copy non-existing obj
|
failed qa in https://pulpito.ceph.com/cbodley-2023-03-29_20:47:34-rgw-wip-cbodley-testing-distro-default-smithi/, including a crash during test_librgw_file.sh: |
this just makes it easier to build all of the tests needed by the test_librgw_file.sh workunit Signed-off-by: Casey Bodley <[email protected]>
|
update: seeing this tcmalloc crash all over the place in focal testing. vstart fails to bootstrap:
i see the same startup crash from https://tracker.ceph.com/issues/58219 tracks a similar crash from the fs suite, but it went away after reverting a commit that changed ceph-dencoder linkage |
|
@mattbenjamin i'm seeing those same ubuntu20 crashes on main in https://pulpito.ceph.com/cbodley-2023-03-30_18:07:30-rgw:verify-main-distro-default-smithi/ |
that suggests this run was a pass, then? Matt |
there were some other failures in the java and datacache tests in https://pulpito.ceph.com/cbodley-2023-03-29_20:47:34-rgw-wip-cbodley-testing-distro-default-smithi/ |
if
RGWCopyObj::verify_permissions()returns an error, it may leave some zipper objects uninitialized. when the user has admin or system privileges, we'll ignore that error and callexecute()anyway. this moves the initialization intoRGWCopyObj::init_processing()insteadFixes: https://tracker.ceph.com/issues/58035
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