DeletePolicy returns Internal error code if the policy not found #898

Closed
opened 2024-01-10 12:09:18 +00:00 by ironbee · 2 comments

When DeletePolicy is called upon non-existing policy, it responds with Internal code. However, the NotFound code seems to be more appropriate for such case.

Sample of the error message:

remove chain policy from node: exec raw: rpc error: code = Internal desc = chain name not found
When DeletePolicy is called upon non-existing policy, it responds with Internal code. However, the NotFound code seems to be more appropriate for such case. Sample of the error message: ``` remove chain policy from node: exec raw: rpc error: code = Internal desc = chain name not found ```
ironbee added the
bug
triage
labels 2024-01-10 12:09:18 +00:00
fyrchik added
frostfs-node
and removed
triage
labels 2024-01-10 12:31:41 +00:00
fyrchik added this to the v0.38.0 milestone 2024-01-10 12:31:44 +00:00
aarifullin self-assigned this 2024-01-10 12:42:27 +00:00
Collaborator

Fixed with #901

Fixed with [#901](https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/901)
Collaborator

Deleting non-existing target (not non-existing chain-id) leads to rule has not been removed:


service@aleksandrmaksimov-node1[alone_datacenter]:~$ frostfs-cli --endpoint localhost:8091 -w test.json control remove-rule --target-type container --target-name 6VJRRegia1igEU9vCrMKMDkgmabcuVfVe6eEp1yn2BDD --chain-id chainRestrictObject
Enter password >
Rule has not been removed.

This should be also fixed

Deleting non-existing target (not non-existing chain-id) leads to `rule has not been removed`: ```bash service@aleksandrmaksimov-node1[alone_datacenter]:~$ frostfs-cli --endpoint localhost:8091 -w test.json control remove-rule --target-type container --target-name 6VJRRegia1igEU9vCrMKMDkgmabcuVfVe6eEp1yn2BDD --chain-id chainRestrictObject Enter password > Rule has not been removed. ``` This should be also fixed
Sign in to join this conversation.
No Milestone
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#898
There is no content yet.