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

Complex object is not readable through non-container node #2447

Closed
cthulhu-rider opened this issue Jul 20, 2023 · 9 comments · Fixed by #2756
Closed

Complex object is not readable through non-container node #2447

cthulhu-rider opened this issue Jul 20, 2023 · 9 comments · Fixed by #2756
Assignees
Labels
bug Something isn't working I2 Regular impact neofs-storage Storage node application issues S2 Regular significance U2 Seriously planned
Milestone

Comments

@cthulhu-rider
Copy link
Contributor

i tried to exec several ops with complex objects on https://github.com/nspcc-dev/neofs-dev-env

steps to reproduce:

  1. run dev env with tuned object size limit https://github.com/nspcc-dev/neofs-dev-env/blob/a9b92f53f7913fc28d4eb307a671030d87a7ecab/neofs-adm.yml#L3
  2. make prepare.ir
  3. create container which does not (!) include all 4 storage nodes
$ neofs-cli -c bin/cli.yml container create --policy 'REP 1' --await
  1. store object with data bigger than the size limit set in step 1
$ neofs-cli -c bin/cli.yml object put --cid 8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon --file Makefile
[Makefile] Object successfully stored
  OID: 9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm
  CID: 8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon
  1. try to read objects from each node
$ neofs-cli -c bin/cli.yml object get --cid 8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon --oid 9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm

3 nodes respond correctly, 1 fails with error

rpc error: read object header: status: code = 2049 message = object not found

log record on the failed node about the operation:

2023-07-20T16:36:03.960Z	debug	get/get.go:87	serving request...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.960Z	debug	get/local.go:25	local get failed	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "status: code = 2049 message = object not found"}
2023-07-20T16:36:03.960Z	debug	get/get.go:108	operation finished with error	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "status: code = 2049 message = object not found"}
2023-07-20T16:36:03.960Z	debug	get/container.go:18	trying to execute in container...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false, "netmap lookup depth": 0}
2023-07-20T16:36:03.960Z	debug	get/container.go:46	process epoch	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false, "number": 3}
2023-07-20T16:36:03.960Z	debug	get/remote.go:14	processing node...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.962Z	debug	get/container.go:87	completing the operation	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.962Z	debug	get/get.go:103	requested object is virtual	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.962Z	debug	get/assemble.go:34	trying to assemble the object...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.962Z	debug	get/assemble.go:83	starting assembling from child	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false, "child ID": "94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf"}
2023-07-20T16:36:03.962Z	debug	get/get.go:87	serving request...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.962Z	debug	get/local.go:25	local get failed	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "status: code = 2049 message = object not found"}
2023-07-20T16:36:03.962Z	debug	get/get.go:108	operation finished with error	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "status: code = 2049 message = object not found"}
2023-07-20T16:36:03.962Z	debug	get/container.go:18	trying to execute in container...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "netmap lookup depth": 0}
2023-07-20T16:36:03.962Z	debug	get/container.go:46	process epoch	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "number": 3}
2023-07-20T16:36:03.962Z	debug	get/remote.go:14	processing node...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.964Z	debug	get/remote.go:34	remote call failed	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "read object header: status: code = 2048 message = access to object operation denied"}
2023-07-20T16:36:03.964Z	debug	get/remote.go:14	processing node...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.966Z	debug	get/remote.go:34	remote call failed	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "read object header: status: code = 2048 message = access to object operation denied"}
2023-07-20T16:36:03.966Z	debug	get/remote.go:14	processing node...	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.968Z	debug	get/remote.go:34	remote call failed	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "read object header: status: code = 2048 message = access to object operation denied"}
2023-07-20T16:36:03.968Z	debug	get/container.go:63	no more nodes, abort placement iteration	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false}
2023-07-20T16:36:03.968Z	debug	get/get.go:108	operation finished with error	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/94U6MXjYyiQUeBbt1Lurjjqe1RRG3Ua6M64x6GzBkpnf", "raw": false, "local": false, "with session": false, "with bearer": false, "error": "status: code = 2049 message = object not found"}
2023-07-20T16:36:03.968Z	debug	get/assemble.go:76	could not init parent from child	{"component": "Object.Get service", "request": "GET", "address": "8w2kxjgNyL9kotkebAtXpYU91gtQkF24EuthgBbYURon/9LQSGzpxXmygaUz4gYgWV3x34Uj76sSnuyqafVPa3Fgm", "raw": false, "local": false, "with session": false, "with bearer": false}

seems like session is lost when out-of-container node spawns new requests or the session doesn't work

Versions

  • neofs-cli v0.37.0
  • neofs-dev-end a9b92f53f7913fc28d4eb307a671030d87a7ecab (with NeoFS v0.37.0 too)
@cthulhu-rider
Copy link
Contributor Author

@roman-khimov roman-khimov added this to the v0.38.0 milestone Jul 20, 2023
@cthulhu-rider
Copy link
Contributor Author

cthulhu-rider commented Jul 21, 2023

we couldn't longer just forward GET request to container node starting from 907f427

@carpawell do u remember why we prevented assembly within local requests? this limit seems pretty strange to me. TTL should control hops of the request only but not it's processing

@cthulhu-rider
Copy link
Contributor Author

despite the fact that the container node refuses to collect the object because of the TTL, why can't the first recipient of the request collect it?

currently it is expected because server cannot associate the requested child object with its parent referenced by the session token. Because of this, in a private container, a out-of-contianer node does not have enough rights, which can be seen from the error log. See #1420

@cthulhu-rider cthulhu-rider self-assigned this Jul 21, 2023
@roman-khimov roman-khimov modified the milestones: v0.38.0, v0.39.0 Sep 13, 2023
@roman-khimov roman-khimov modified the milestones: v0.39.0, v0.40.0 Nov 28, 2023
@roman-khimov roman-khimov added U2 Seriously planned S2 Regular significance I2 Regular impact labels Dec 21, 2023
@roman-khimov roman-khimov modified the milestones: v0.40.0, v0.41.0 Jan 29, 2024
@roman-khimov
Copy link
Member

May be related to #838.

@cthulhu-rider
Copy link
Contributor Author

cthulhu-rider commented Feb 27, 2024

the problem is definitely caused by TTL:

therefore, to fix this bug, at least one of following changes is required:

  1. process TTL from the original request (2 in this scenario)
  2. allow object assembly with TTL=1

to me:

  • 1 is legit cuz forwarding should add some addtional meta info only, not change processing of the original request
  • 2 is also makes sense, see my comment aboe. 907f427 doesnt describe the problem it solved

@roman-khimov @carpawell what do u think?

@carpawell
Copy link
Member

carpawell commented Feb 27, 2024

I think 1. is correct in general if it is forwarding without any request changes. But if we change request (even with some minimal meta info) that is not forwarding to me and should decrease TTL. The only TTL non-decreasing operation to me is forwarding that does not allow you to understand that forwarder ever existed.
2. is also correct to me but may break some cases. Mb even test cases that test some think with neofs-cli.

@cthulhu-rider
Copy link
Contributor Author

may break some cases

every change may break some cases in theory. What cases?

@roman-khimov
Copy link
Member

TTL is there mostly to avoid endless forwarding, to me it's mostly the problem of our approach to it as "local request". Distinguishing small/big object requests just shouldn't rely on TTL to me.

@carpawell
Copy link
Member

What cases?

I do remember that i have tested smth in the object assembly process with TTL 1. But we may consider this as a kludge.

cthulhu-rider added a commit that referenced this issue Feb 27, 2024
This reverts commit 907f427.

GET requests with TTL=1 are absolutely correct regardless of the need to
assemble the object. This TTL blocks request forwarding - it does not
happen. At the same time, assembling an object on the server spawns
new requests from scratch, which is not forwarding. The original commit
does not have a description of the cause, and it was never discovered.

Fixes #2447.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit that referenced this issue Feb 27, 2024
This reverts commit 907f427.

GET requests with TTL=1 are absolutely correct regardless of the need to
assemble the object. This TTL blocks request forwarding - it does not
happen. At the same time, assembling an object on the server spawns
new requests from scratch, which is not forwarding. The original commit
does not have a description of the cause, and it was never discovered.

Fixes #2447.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
roman-khimov added a commit to nspcc-dev/neofs-sdk-go that referenced this issue Feb 28, 2024
This value is better be known to users and it's better be more than two since
we can have more complicated communications in future.

Refs. nspcc-dev/neofs-node#2447

Signed-off-by: Roman Khimov <roman@nspcc.ru>
roman-khimov added a commit to nspcc-dev/neofs-sdk-go that referenced this issue Feb 29, 2024
This value is better be known to users and it's better be more than two since
we can have more complicated communications in future.

Refs. nspcc-dev/neofs-node#2447

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I2 Regular impact neofs-storage Storage node application issues S2 Regular significance U2 Seriously planned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants