-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Use snapshot of NodeDeletionTracker for ActuationStatus #5562
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
Use snapshot of NodeDeletionTracker for ActuationStatus #5562
Conversation
4acb5e8 to
1afb605
Compare
1874371 to
bd62ff5
Compare
cluster-autoscaler/core/scaledown/deletiontracker/nodedeletiontracker.go
Show resolved
Hide resolved
| // TODO: snapshot information from the tracker instead of keeping live | ||
| // updated object. | ||
| return a.nodeDeletionTracker | ||
| return a.nodeDeletionTracker.Snapshot() |
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.
I think ideally we'd just replace ActuationStatus interface with a simple struct that doesn't have the mutex overhead. It would also be simpler to mock in tests. Can you add a TODO for this somewhere? Perhaps next to the interface definition.
bd62ff5 to
7a218f3
Compare
7a218f3 to
156ee9e
Compare
156ee9e to
dec8136
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: x13n, yaroslava-serdiuk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
Node deletions happens in separate go routine, so it's possible that node was removed during unneeded node verification. In such case we have updated number of ongoing deletions but outdated size of the node group, so CA will have wrong verification of min size of the node group.