Skip to content

rgw: map transport errors and log error_ret in ops log - #73055

Open
RaminNietzsche wants to merge 1 commit into
ceph:mainfrom
RaminNietzsche:wip-rgw-s3-http-error-mapping
Open

RaminNietzsche wants to merge 1 commit into
ceph:mainfrom
RaminNietzsche:wip-rgw-s3-http-error-mapping

Conversation

@RaminNietzsche

@RaminNietzsche RaminNietzsche commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Map common transport and lifecycle failures to distinct S3 Code strings (e.g. ConnectionReset, BucketResharding) via ERR_RGW_* and rgw_http_error_map_key(), instead of generic UnknownError.
  • Add error_ret to JSON ops log entries (encode struct v17) so operators can correlate error_code with the daemon op status errno.
  • Document ops log error fields in doc/radosgw/ops-log.rst; use ceph::from_error_code() for rgw::io::Exception on PUT body I/O paths.

Fixes: https://tracker.ceph.com/issues/82075

Testing

  • ninja unittest_rgw_http_errors && ./bin/unittest_rgw_http_errors (10 tests) in test environment
  • Docs: doc/radosgw/ops-log.rst, PendingReleaseNotes

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)

@RaminNietzsche

Copy link
Copy Markdown
Member Author

jenkins test make check

@RaminNietzsche

Copy link
Copy Markdown
Member Author

jenkins test make check

@RaminNietzsche

Copy link
Copy Markdown
Member Author

Rebased onto current main (169a0fb3a86c). New tip: 7048617f5754.

@RaminNietzsche
RaminNietzsche force-pushed the wip-rgw-s3-http-error-mapping branch from 8f50744 to 7048617 Compare October 27, 2026 16:49
@RaminNietzsche

Copy link
Copy Markdown
Member Author

@adamemerson @cbodley Gentle ping for review. All checks are green on tip 7048617f5754. This maps transport-level errors to distinct S3 error codes and records error_ret in the ops log (tracker #82075).

@anrao19

anrao19 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao9-testing-2026-11-13-0841-main.

@anthonyeleven

Copy link
Copy Markdown
Contributor

Hey Ramin, heads up. My docs PR #74155 sits on top of this one, and its make check fails on current main in unittest_rgw_cuobj_put. The cuObject tests from #70458 merged on Nov 4, after your last CI run, and they expect -EIO to come back as 500 UnknownError. Since rgw_http_error_map_key() now maps EIO to ERR_INTERNAL_ERROR, the body says InternalError instead, so 9 of the 15 cases fail on the <Code> check: CuObjPut.FilterFailureReleasesBufferWithoutCommitting, CuObjPut.StorageFailureDoesNotReturnRdmaSuccess, and every CompletionCounts/CuObjPutReadFailure param except -EINVAL.

The fix is just the test's expected code, UnknownError to InternalError in three spots: 7edf751

This PR will hit the same thing once it's rebased or merged, so you might want to pick that up here. Otherwise main's make check goes red when this lands.

Map common transport errno values to distinct S3 Code strings and
record error_ret in JSON ops log entries (encode struct v17). Use
ceph::from_error_code() on rgw::io::Exception in PUT paths.

Align unittest_rgw_cuobj_put with EIO -> InternalError mapping after
ceph#70458 cuObject tests landed on main.

Document ops log error fields in doc/radosgw/ops-log.rst.

Fixes: https://tracker.ceph.com/issues/82075
Signed-off-by: ramin.najarbashi <[email protected]>
@RaminNietzsche
RaminNietzsche force-pushed the wip-rgw-s3-http-error-mapping branch from 7048617 to 6f29aea Compare November 28, 2026 12:00
@RaminNietzsche

Copy link
Copy Markdown
Member Author

Rebased on current main and squashed to a single commit on the fork (6f29aea1650).

Updates:

Thanks @anthonyeleven for flagging the cuobj expectation drift — should be unblocked now.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

jenkins test make check

@RaminNietzsche

Copy link
Copy Markdown
Member Author

@anthonyeleven Re: #73055 (comment) — addressed on 6f29aea1650; cuobj expectations updated and unit tests green locally.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

@anrao19 QA coordination for tracker https://tracker.ceph.com/issues/83138 (wip-anrao9-testing):

The earlier Shaman/QA batch for the pre-rebase tip finished without problems on our side. This branch now has a rebased squashed commit (6f29aea1650) that also fixes unittest_rgw_cuobj_put expectations (EIO → InternalError) per @anthonyeleven's note.

If that means the previous queue entry should be dropped for the old SHA, please pull it from the batch; I will ask @anthonyeleven for a quick re-review on the new tip, and once that is in we can add #73055 back for a fresh QA/Shaman run as you prefer.

Jenkins make check was requested on 6f29aea1650 (still pending as of this comment).

@mheler

mheler commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

@anrao19 QA coordination for tracker https://tracker.ceph.com/issues/83138 (wip-anrao9-testing):

The earlier Shaman/QA batch for the pre-rebase tip finished without problems on our side. This branch now has a rebased squashed commit (6f29aea1650) that also fixes unittest_rgw_cuobj_put expectations (EIO → InternalError) per @anthonyeleven's note.

If that means the previous queue entry should be dropped for the old SHA, please pull it from the batch; I will ask @anthonyeleven for a quick re-review on the new tip, and once that is in we can add #73055 back for a fresh QA/Shaman run as you prefer.

Jenkins make check was requested on 6f29aea1650 (still pending as of this comment).

Hi @RaminNietzsche typically the component leads will review the QA runs, and make a decision on passing, dropping or rejecting a change. Let's please wait for the review feedback. Thank you.

@RaminNietzsche

Copy link
Copy Markdown
Member Author

Hi @RaminNietzsche typically the component leads will review the QA runs, and make a decision on passing, dropping or rejecting a change. Let's please wait for the review feedback. Thank you.

@mheler Thanks — understood. I will not ask for queue churn on my side; we will wait for the component lead’s QA review on tracker https://tracker.ceph.com/issues/83138 and follow whatever pass / drop / reject decision comes out of that.

For context only: the rebased tip is 6f29aea1650 (cuobj expectations aligned with @anthonyeleven’s note). Jenkins make check (and arm64) are green on that commit; I have already requested a quick re-review from @anthonyeleven on the new tip. Happy to adjust if QA wants a fresh batch on the updated SHA — I will leave that to you and the leads.

@anthonyeleven anthonyeleven left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

docs lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants