Skip to content
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

[cherry-pick-v1.30] Fix Race conditions in Targeted Deletion of machines by CA (#341) #344

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

aaronfern
Copy link

What this PR does / why we need it:
This PR cherry picks the the following commit: edd7d34d

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Fix for data-races in concurrent CA scaledowns and CA restarts

)

* [WIP] fix CA marking machines for deletion

* [WIP] add mutex for machine deployment

* initialise machinedeployment map in mcmManager

* add Refresh method in nodegrp implementation

* address review comments

* address review comments - part 2

* update unit tests, misc code changes

* review comments addressed

* fixed broken test after refactor

* fixed broken test

* alternate solution using single annotation for deletion by CA

* fixed use of Go 1.23 functions

* fixed test

* added godoc for AcquireScalingMutex

* correct godoc for machinesMarkedByCAForDeletionAnnotation

* changed to machineutils.TriggerDeletionByMCM

* removed var shadowing, added TODO to godoc for util fns

* corr var names, clear mutex acquire, releasing logs

* ensured IncreaseSize/DecreaseTargetSize logged  delta in mutex acquire/release log

* review comments addressed: fixed unit test, adjusted log, removed redundant fn

* all code review comments addressed

* review feedback: unexport belongs, enforce interface

* addreseed review comment, refactored added test for computeScaleDownData

* review comment: preset capacity for slices

* review feedback: ->computeScaleDownData and revised godoc

* cordon nodes fix for when node is disabled for scaledown

* fixed unit test string quoting issue

---------

Co-authored-by: Rishabh Patel <[email protected]>
Co-authored-by: elankath <[email protected]>
@aaronfern aaronfern requested review from unmarshall and a team as code owners February 4, 2025 21:21
@gardener-robot gardener-robot added needs/review Needs review size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Feb 4, 2025
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Feb 4, 2025
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Feb 4, 2025
@aaronfern aaronfern merged commit 31815d2 into gardener:rel-v1.30 Feb 4, 2025
10 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review needs/second-opinion Needs second review by someone else size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants