-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
set node.StatusUpdatedAt in raft #5746
Conversation
Fix a case where `node.StatusUpdatedAt` was manipulated directly in memory. This ensures that StatusUpdatedAt is set in raft layer, and ensures that the field is updated when node drain/eligibility is updated too.
0a4fc19
to
c702353
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Node.StatusUpdatedAt purely informational or does logic depend on it?
I ask because it seems like during server upgrades old servers will be setting UpdatedAt=0 which will overwrite Node.StatusUpdatedAt times that are >0. The pathological case being if the time is used for determining client liveness and suddenly during an upgrade 2/3 of the clients get marked as lost
.
We could guard the writes with a >0 check, but if it's purely informational I don't think it's worth worrying about as the the times will be corrected once all servers are updated and all clients have heartbeated.
It's purely informational, as it's returned in API. The only place that nomad code reads it is when [1] nomad/nomad/state/state_store.go Lines 676 to 690 in c00d6a4
|
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fix a case where
node.StatusUpdatedAt
was manipulated directly inmemory. This ensures that StatusUpdatedAt is set in raft layer.
Also, this ensures that the field is updated when node drain/eligibility is updated too. Previously, StatusUpdatedAt is only updated at next node heartbeat. Interestingly, the drain case was handled previously in 76b913c but it got dropped at some point, but not sure why.