Project

General

Profile

Bug #18241

rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element

Added by Radoslaw Zarzynski almost 3 years ago. Updated 3 months ago.

Status:
Pending Backport
Priority:
Normal
Target version:
-
Start date:
12/13/2016
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
luminous mimic nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

According to the AWS documentation the Code element in an error response for Multi-Object Delete should be a string with values resembling codes we usually convey as rgw_http_errors::s3_code.

Code

Status code for the result of the failed delete. .

Type: String

Values: AccessDenied, InternalError

Ancestor: Error

Actually we are dumping Code as int with HTTP response number. In RGWDeleteMultiObj_ObjStore_S3::send_partial_response we have:

      s->formatter->open_object_section("Error");

      err_no = -op_ret;
      rgw_get_errno_s3(&r, err_no);

      s->formatter->dump_string("Key", key.name);
      s->formatter->dump_string("VersionId", key.instance);
      s->formatter->dump_int("Code", r.http_ret);
      s->formatter->dump_string("Message", r.s3_code);
      s->formatter->close_section();


Related issues

Copied to rgw - Backport #40135: luminous: rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element In Progress
Copied to rgw - Backport #40136: mimic: rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element Resolved
Copied to rgw - Backport #40137: nautilus: rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element Resolved

History

#1 Updated by Radoslaw Zarzynski almost 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Radoslaw Zarzynski

#2 Updated by Chang Liu almost 3 years ago

I have found whole list about S3 code/message: http://docs.aws.amazon.com/AmazonS3/latest/API/s3-api.pdf Page25. I would like to fix this bug. assign this issue to me, please.

#4 Updated by Yehuda Sadeh over 2 years ago

That's the PR that addresses this specific issue:
https://github.com/ceph/ceph/pull/12470

It's waiting on a test in the s3 test suite.

#5 Updated by Casey Bodley 4 months ago

  • Status changed from In Progress to Pending Backport
  • Backport set to luminous mimic nautilus

#6 Updated by Nathan Cutler 4 months ago

  • Copied to Backport #40135: luminous: rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element added

#7 Updated by Nathan Cutler 4 months ago

  • Copied to Backport #40136: mimic: rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element added

#8 Updated by Nathan Cutler 4 months ago

  • Copied to Backport #40137: nautilus: rgw: the Multi-Object Delete operation of S3 API wrongly handles the "Code" response element added

#9 Updated by Nathan Cutler 3 months ago

  • Pull request ID set to 12470

Also available in: Atom PDF