Small fixes for netmap status transitions #1110

Merged
fyrchik merged 4 commits from fyrchik/frostfs-node:fix-status into master 2024-04-27 13:44:12 +00:00

This PR mostly fixes a race condition when node could ignore bootstrap query even though it is no longer in the maintenance state.

Testing done (dev-env):

  1. Move node to maintenance, tick epoch -> snapshot reports good state.
  2. Move node to online -> see message in logs.
  3. Move node to online -> see no message in logs.
  4. Tick epoch -> see online status in the snapshot command.
This PR mostly fixes a race condition when node could ignore bootstrap query even though it is no longer in the maintenance state. Testing done (dev-env): 1. Move node to maintenance, tick epoch -> snapshot reports good state. 2. Move node to online -> see message in logs. 3. Move node to online -> see no message in logs. 4. Tick epoch -> see online status in the snapshot command.
fyrchik added 4 commits 2024-04-27 12:16:34 +00:00
f43cbbffd6 node: Fix comment about nodeInfo type
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
0b87ed3f5f node: Rename handleLocalNodeInfo()
It is used in "handler" only once, what we really do is set the
variable. And we have another "local" node info in `cfgNodeInfo`, this
one is not really local (node info), more like (local node) info, so use
setContractNodeInfo to distinguish it from the local view on the node
info.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2377d03aae node: Log maintenance stop only if it was enabled
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
DCO action / DCO (pull_request) Failing after 2m0s Details
Build / Build Components (1.21) (pull_request) Successful in 3m24s Details
Build / Build Components (1.22) (pull_request) Successful in 3m21s Details
Vulncheck / Vulncheck (pull_request) Successful in 3m28s Details
Tests and linters / Staticcheck (pull_request) Successful in 7m0s Details
Tests and linters / gopls check (pull_request) Successful in 7m16s Details
Tests and linters / Lint (pull_request) Successful in 9m2s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 13m20s Details
Tests and linters / Tests (1.22) (pull_request) Successful in 13m17s Details
Tests and linters / Tests with -race (pull_request) Successful in 13m35s Details
49d6131773
node: Use single handler for new epoch event
Bootstrap logic depends on the netmap status, which in turn depends on
the node info. Updating them in a single thread makes things more
predictable.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik requested review from storage-core-committers 2024-04-27 12:16:43 +00:00
fyrchik requested review from storage-core-developers 2024-04-27 12:16:44 +00:00
fyrchik added this to the v0.39.0 milestone 2024-04-27 12:16:45 +00:00
fyrchik force-pushed fix-status from 49d6131773 to 52bebe9452 2024-04-27 12:17:57 +00:00 Compare
acid-ant approved these changes 2024-04-27 13:04:06 +00:00
achuprov approved these changes 2024-04-27 13:23:57 +00:00
fyrchik merged commit 52bebe9452 into master 2024-04-27 13:44:12 +00:00
fyrchik deleted branch fix-status 2024-04-27 13:44:12 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 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#1110
There is no content yet.