Remote PUT error won't propagate status code to client #1710

Closed
opened 2025-04-07 12:07:49 +00:00 by aarifullin · 1 comment
Member

Expected Behavior

A client (for instance, frostfs-cli) gets correct status code even the request is being processed on non-container node

Current Behavior

If the request is sent to non-container node and fails, client isn't able to parse an error status code

Possible Solution

  1. Add Unwrap() to errIncompletePut
  2. Make putStreamSigner sign response and set status even CloseAndRecv returns an error

Steps to Reproduce (for bugs)

  1. Create REP 1 CBF 1 SELECT 1 container. Create ape-chain with allowing rules for this container;
  2. Add local-override to container node with deny rule;
  3. Try to put an object to this container requesting non-container node

Context

S3-GW is not able to correctly parse a status code and "sinks" it down to HTTP 500 status.

Regression

No regression

Your Environment

frostfs-dev-env

<!-- Provide a general summary of the issue in the Title above --> ## Expected Behavior A client (for instance, `frostfs-cli`) gets correct status code even the request is being processed on **non**-container node ## Current Behavior If the request is sent to non-container node and fails, client isn't able to parse an error status code ## Possible Solution 1. Add `Unwrap()` to [errIncompletePut](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/2a6cdbdb72a3acb07948bf1e0124df98fc964925/pkg/services/object/common/writer/distributed.go#L84) 2. Make [putStreamSigner](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/2a6cdbdb72a3acb07948bf1e0124df98fc964925/pkg/services/object/sign.go#L92-L103) sign response and set status **even** `CloseAndRecv` returns an error ## Steps to Reproduce (for bugs) <!-- Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. --> 1. Create `REP 1 CBF 1 SELECT 1` container. Create ape-chain with allowing rules for this container; 2. Add local-override to container node with `deny` rule; 3. Try to put an object to this container requesting **non-container** node ## Context S3-GW is not able to correctly parse a status code and "sinks" it down to HTTP 500 status. ## Regression No regression ## Your Environment `frostfs-dev-env`
aarifullin added the
bug
triage
labels 2025-04-07 12:07:49 +00:00
fyrchik added the
frostfs-node
label 2025-04-07 14:39:26 +00:00
Owner
Related https://git.frostfs.info/TrueCloudLab/frostfs-api/issues/33
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1710
No description provided.