Fix get range hash #906
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#906
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/get_range_hash_permissions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relates #891
To reproduce on 4 node cluster:
REP 1 IN X CBF 1 SELECT 1 FROM * AS X
and put objectfrostfs-cli object hash --range ...
) from different nodesThe request will be executed successfully on only one node (container node). Other requests will fail with access denied error, because get range hash performs get request signed with node's key.
Now node redirects get range hash request to container node, so all subsequent requests will pass.
@ -567,4 +567,8 @@ const (
EngineInterruptProcessingZeroSizeContainers = "interrupt processing zero-size containers"
EngineInterruptProcessingZeroCountContainers = "interrupt processing zero-count containers"
EngineFailedToGetContainerCounters = "failed to get container counters"
GetSvcV2FailedToParseNodeEndpoints = "failed to parse node endpoints"
Seems like a generic error, don't we have it in other redirect places?
Nope, traverser ignores it.
@ -0,0 +48,4 @@
address oid.Address
}
func (s *Service) needToForwardGetRangeHashRequest(req *objectV2.GetRangeHashRequest) (getRangeForwardParams, error) {
Is it copied from some other forwarding place? Does it make sense to reuse the code here?
Nope
@ -0,0 +88,4 @@
if err != nil {
return result, fmt.Errorf("(%T) could not build object placement: %w", s, err)
}
result.containerNodes = distinctBy(placement.FlattenNodes(nodesVector), func(n netmapSDK.NodeInfo) string { return hex.EncodeToString(n.PublicKey()) })
Why do we need distinct nodes here?
For complex selectors node's list may contain duplicates without
UNIQUE
keyword.In case of cluster with hundreds nodes, maybe it is better to iterate once via slice from
FlattenNodes
inforwardGetRangeHashRequest
?469ef1550f
to52ffa9f164