rdma: report RC route errors through the S3 error boundary - #2355
Merged
Conversation
Collaborator
|
This won't automatically run in continuous integration without approval. A member of the Versity organization must allow it. |
The RC control routes returned fiber.Error values for 400, 404, 409, 429, 502, and 503 outcomes, but the production S3 error handler converts ordinary fiber errors into a generic 500 response, so clients observed InternalError for every protocol outcome. The routes now send the final status and S3-style XML body themselves through a shared terminal serializer. S3-aware errors from authentication, authorization, and the object backend keep their status and code. Session-server failures map to protocol error codes: InvalidRdmaRequest, NoSuchRdmaSession, RdmaSessionConflict, RdmaResourceLimit, RdmaTransferFailed, and RdmaServiceUnavailable. Owner mismatch answers the same 404 as an unknown session so a session id is never disclosed across principals. The platform stub keeps its 501 answer and uses the same response shape.
Classify the rejected-argument, short-transfer, and oversized- value failures of the session server as bad requests at the route boundary, answering the closest S3-style protocol error instead of a generic internal failure.
Cover the route error boundary with the real S3 server: the shared serializer keeps status and body for wrapped S3 errors, raw fiber errors stay 500, and the platform stub answers 501. The stub-answer classifier moves next to the shared marker type in the same commit so every build answers 501 at the point the test first runs, and the general CI workflow builds the session-server archive before go test, which the Linux link of this package now requires.
The RC auth adapter returned signature-verification errors to Fiber, so the production S3 error handler collapsed them into a generic 500 response; authentication failures lost their real status and code the same way route failures did before the terminal serializer. The adapter now sends verification errors through the shared serializer as well.
Classify the platform-stub answer before the internal-error logging decision, so the expected 501 no longer logs as an internal 500 while debugging production servers. Serialize the full S3 error XML body instead of the base error alone: per-type diagnostics such as the access key and the string-to-sign survive the route boundary. A regression test wraps a signature failure with both diagnostic fields and asserts the response keeps the status, the code, and both fields. Assert the response body identifiers equal the request-ID headers, pinning the two views of the same response.
potatogim
force-pushed
the
rdma-rc-route-errors
branch
from
September 4, 2026 10:46
585073c to
1596531
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2354.
Reports hipobj-rc-v2 route failures through the S3 error boundary instead of collapsing them to bare 500s. Transport-level failures inside the RC session layer map to S3 protocol codes (bad request for rejected arguments and short or oversized transfers, internal error for the rest), and the response keeps the full S3 error XML body, so per-type diagnostics such as the access key and string-to-sign survive the route boundary the same way they do on the regular S3 routes. Auth failures take the same path, and the platform stub answers 501 on every build, classified before the internal-error logging decision so it no longer logs as an internal 500.
The s3api boundary tests cover the mapping through the production server and link the RC session-server archive on the general CI platform, so the workflow builds it before the test step. Regression tests assert a wrapped signature failure keeps the status, the code, and both diagnostic fields, and that the response body identifiers equal the request-id headers.