Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object-lock command improvement suggestions #1971

Open
vkarak1 opened this issue Oct 25, 2022 · 3 comments
Open

object-lock command improvement suggestions #1971

vkarak1 opened this issue Oct 25, 2022 · 3 comments
Labels
discussion Open discussion of some problem enhancement Improving existing functionality I3 Minimal impact neofs-storage Storage node application issues S4 Routine U4 Nothing urgent

Comments

@vkarak1
Copy link

vkarak1 commented Oct 25, 2022

Is your feature request related to a problem? Please describe.

Could you please consider two suggestions to the object-lock command:

  1. Object lock can not be run while shard is in read-only state and neofs-cli returns unfriendly message, is that possible to improve the message in described case? Now it displays:
    Store lock object in NeoFS: client failure: status: code = 1024 message = lock operation failed
  2. It would be great to specify object_id and container_id in object-lock command using usual "--cid" and "--oid" prefixes. Now the command looks the following:
    neofs-cli object lock -r node1:8080 -w /etc/neofs/storage/wallet.json --expire-at 10 893dGYPLgRNSiqVBW61J7aP1xLvsYzGxQViNZ6smmUx5 8sRdhwH6ERxjC4cpXEiNcVYaeYudGynpzxsD6wfCJSGk

NeoFS Storage node
Version: v0.33.0-31-ge1be0180
GoVersion: go1.18.4

@alexchetaev alexchetaev added the U3 Regular label Oct 25, 2022
@carpawell carpawell self-assigned this Oct 28, 2022
carpawell added a commit that referenced this issue Nov 1, 2022
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell
Copy link
Member

carpawell commented Nov 14, 2022

@cthulhu-rider, @fyrchik, @realloc, 1. took another form after the fix. Is it the expected kind of that error representation (forwarding, wrapping and all)?

2. Was fixed via the #1998.

@carpawell
Copy link
Member

Closed via #1998.

@carpawell
Copy link
Member

I misunderstand the 1. point, it is about an error description, not about an error chain.

The problem is in that line: we just do not have enough information about the errors we get. I guess it was done on purpose: we iterate over some shard set and we do not have any error that could wrap some other errors, so it is just not clear what error we can return here: the first, the last of try to add some API error that could wrap all errors from all shards and return that "encapsulated error set".

The case that led to that error creation was RO mode for every node's shard. So what message could be printed here? RO shard? That would mean that the last shard failed because of RO but no info about the previous ones. What if the first one (the desired one) has RO mode? print nothing cause that is not an error and we did lock an object?

/cc @fyrchik, @vkarak1, @acid-ant, @cthulhu-rider

@carpawell carpawell reopened this Dec 12, 2022
@carpawell carpawell removed their assignment Jan 10, 2023
@roman-khimov roman-khimov added U4 Nothing urgent S4 Routine I3 Minimal impact and removed U3 Regular labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Open discussion of some problem enhancement Improving existing functionality I3 Minimal impact neofs-storage Storage node application issues S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

5 participants