Skip to content
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

octopus: rgw: forward request in multisite for RGWDeleteBucketPolicy and RGWDeleteBucketPublicAccessBlock #45435

Closed
wants to merge 1 commit into from

Conversation

cfsnyder
Copy link
Contributor

backport tracker: https://tracker.ceph.com/issues/51776


backport of #35061
parent tracker: https://tracker.ceph.com/issues/45551

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh

@@ -7850,6 +7850,13 @@ int RGWDeleteBucketPolicy::verify_permission()

void RGWDeleteBucketPolicy::execute()
{
bufferlist data;
op_ret = forward_request_to_master(s, nullptr, store, data, nullptr, s->info);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ceph-15.2.16-106-g57e79a81/src/rgw/rgw_op.cc: In member function ‘virtual void RGWDeleteBucketPolicy::execute()’:
/ceph-15.2.16-106-g57e79a81/src/rgw/rgw_op.cc:7855:75: error: cannot convert ‘req_info’ to ‘req_info*’
   op_ret = forward_request_to_master(s, nullptr, store, data, nullptr, s->info);
                                                                        ~~~^~~~
/ceph-15.2.16-106-g57e79a81/src/rgw/rgw_op.cc:3024:57: note:   initializing argument 6 of ‘int forward_request_to_master(req_state*, obj_version*, rgw::sal::RGWRadosStore*, ceph::bufferlist&, JSONParser*, req_info*)’
                               JSONParser *jp, req_info *forward_info)

 and RGWDeleteBucketPublicAccessBlock

Fix: https://tracker.ceph.com/issues/45551

Signed-off-by: yuliyang_yewu <yuliyang_yewu@cmss.chinamobile.com>
(cherry picked from commit 1f9267e)

Conflicts:
	src/rgw/rgw_op.cc

Cherry-pick notes:
- signature of forward_request_to_master changed after Octopus and was not a member of Store
@cbodley
Copy link
Contributor

cbodley commented May 18, 2022

seeing some s3test failures (example teuthology.log):

======================================================================
ERROR: s3tests_boto3.functional.test_s3.test_bucket_policy_acl
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/cephtest/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/ubuntu/cephtest/s3-tests/s3tests_boto3/functional/test_s3.py", line 10320, in test_bucket_policy_acl
    client.delete_bucket_policy(Bucket=bucket_name)
  File "/home/ubuntu/cephtest/s3-tests/virtualenv/lib/python3.6/site-packages/botocore/client.py", line 508, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/ubuntu/cephtest/s3-tests/virtualenv/lib/python3.6/site-packages/botocore/client.py", line 911, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (UnknownError) when calling the DeleteBucketPolicy operation (reached max retries: 4): Unknown
-------------------- >> begin captured logging << --------------------

======================================================================
ERROR: s3tests_boto3.functional.test_s3.test_bucketv2_policy_acl
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/cephtest/s3-tests/virtualenv/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/ubuntu/cephtest/s3-tests/s3tests_boto3/functional/test_s3.py", line 10360, in test_bucketv2_policy_acl
    client.delete_bucket_policy(Bucket=bucket_name)
  File "/home/ubuntu/cephtest/s3-tests/virtualenv/lib/python3.6/site-packages/botocore/client.py", line 508, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/ubuntu/cephtest/s3-tests/virtualenv/lib/python3.6/site-packages/botocore/client.py", line 911, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (UnknownError) when calling the DeleteBucketPolicy operation (reached max retries: 4): Unknown
-------------------- >> begin captured logging << --------------------

this makes it sound like it's trying to forward the request and hanging, but it isn't a multisite configuration so there's no master zone to send anything to

@@ -7850,6 +7850,13 @@ int RGWDeleteBucketPolicy::verify_permission()

void RGWDeleteBucketPolicy::execute()
{
bufferlist data;
op_ret = forward_request_to_master(s, nullptr, store, data, nullptr, &s->info);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of the other callers (at least, on octopus) are making this call conditionally. for example, in RGWPutBucketPolicy::execute():

  if (!store->svc()->zone->is_meta_master()) {
    op_ret = forward_request_to_master(s, NULL, store, data, nullptr);
    if (op_ret < 0) {
      ldpp_dout(this, 20) << "forward_request_to_master returned ret=" << op_ret << dendl;
      return;
    }
  }

can you please wrap both of these calls to forward_request_to_master() the same way?

  if (!store->svc()->zone->is_meta_master()) {

@cfsnyder cfsnyder closed this Nov 28, 2022
@cfsnyder cfsnyder deleted the wip-51776-octopus branch November 28, 2022 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants