Project

General

Profile

Actions

Bug #82075

open
RN RN

rgw: distinct S3 error codes and error_ret in ops log

Bug #82075: rgw: distinct S3 error codes and error_ret in ops log

Added by Ramin Najarbashi about 1 month ago. Updated about 1 month ago.

Status:
Fix Under Review
Priority:
Normal
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

Summary

Operators correlate RGW ops logs (error_code, http_status) with client and proxy behavior. Several common failure modes map to UnknownError (HTTP 500) even though the daemon log shows a specific op status (e.g. -104 ECONNRESET after a load balancer reset during PUT). That makes dashboards and runbooks harder: quota rejections show QuotaExceeded while connection resets look like generic server failures.

Multipart and resharding cases share the same problem when internal errno or ERR_* values are not in rgw_http_s3_errors.

Proposal

  • Add RGW-specific ERR_RGW_* codes and rgw_http_error_map_key() to map transport errno (e.g. ECONNRESET, EPIPE) to distinct S3 Code strings (ConnectionReset, BrokenPipe, …) instead of UnknownError. Map EIO to InternalError; ERR_BUSY_RESHARDING to BucketResharding (503).
  • Preserve the original internal value in ops logs: new error_ret field on rgw_log_entry (encode struct v17), set from s->err.ret.
  • Use ceph::from_error_code() for rgw::io::Exception in recv_body / dump_body and selected RGWPutObj paths.
  • Document fields and codes in doc/radosgw/ops-log.rst; PendingReleaseNotes bullet.

Testing

  • unittest_rgw_http_errors: map keys, set_req_state_err for ECONNRESET, rgw_log_entry v17 round-trip.
  • Built and run in test environment (10/10 pass).

Notes

  • New Code strings are for observability; they are not AWS S3 API extensions. Clients behind proxies may still see 502 without RGW XML.
  • EBUSY on multipart lock remains ServiceUnavailable (503); use error_ret=-16 to distinguish from resharding.

RN Updated by Ramin Najarbashi about 1 month ago Actions #1

  • Assignee set to Ramin Najarbashi

RN Updated by Ramin Najarbashi about 1 month ago Actions #2

  • Pull request ID set to 73055

RN Updated by Ramin Najarbashi about 1 month ago Actions #4

  • Status changed from New to Fix Under Review

Fix in review: https://github.com/ceph/ceph/pull/73055 (S3 error codes + ops log error_ret). Status → Fix Under Review.

Actions

Also available in: PDF Atom