container/ape: Ignore an error when getting a role #1454
No reviewers
TrueCloudLab/storage-core-developers
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#1454
Loading…
Reference in a new issue
No description provided.
Delete branch "a-savchuk/frostfs-node:container-get-on-first-epoch"
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?
Close #1448
When getting a role in the APE checker for the container services, an error may be returned if network maps of the previous two epochs don't have enough nodes to fulfil a container placement policy. It's a logical error, so we should ignore it.
The affected function
isContainerNode
is used for determining if an actor is a container role when checking an APE rule. It's guaranteed that the policy of a container is valid because that container has been with that policy before. So, the only error could be returned if the map doesn't have enough nodes. It's a logical error, we should ignore it because it doesn't affect an actor role determining.Before:
After:
WIP: services/container/ape: Ignore an error when getting a roleto WIP: container/ape: Ignore an error when getting a role96b5b6a28b
to2fa82acd1c
2fa82acd1c
toe70c2cedbe
WIP: container/ape: Ignore an error when getting a roleto container/ape: Ignore an error when getting a role@ -562,0 +554,4 @@
// don't have enough nodes to fulfil a container placement policy.
// It's a logical error, so we should ignore it.
// See https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1448.
cnrVectors, _ := nm.ContainerNodes(cont.Value.PlacementPolicy(), binCnrID)
Why is any error ignored, but not only specific one?
Made the PR description more detailed:
Moreover, that error is not a part of the SDK interface, so if I ignore only that error, it'll look like this
@ -562,0 +553,4 @@
// An error may be returned if network maps of the previous two epochs
// don't have enough nodes to fulfil a container placement policy.
// It's a logical error, so we should ignore it.
// See https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/1448.
Link to the issue looks redundant here, it will be in the commit message.
Yeah, removed it✅
container/ape: Ignore an error when getting a roleto WIP: container/ape: Ignore an error when getting a roleNew commits pushed, approval review dismissed automatically according to repository settings
6daa1fda7f
tod28a5d2d7a
WIP: container/ape: Ignore an error when getting a roleto container/ape: Ignore an error when getting a role