-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 Include machinepools in descendant count #4295
🐛 Include machinepools in descendant count #4295
Conversation
/milestone v0.4.0 /lgtm |
@@ -326,7 +326,8 @@ func (c *clusterDescendants) length() int { | |||
return len(c.machineDeployments.Items) + | |||
len(c.machineSets.Items) + | |||
len(c.controlPlaneMachines.Items) + | |||
len(c.workerMachines.Items) | |||
len(c.workerMachines.Items) + | |||
len(c.machinePools.Items) |
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 there a unit test we can add to validate this?
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.
Yeah can do, didn't notice any existing ones but I'm happy to add one.
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.
Added a simple unit test.
Without this, machinepool descendants are ignored in deletion logic and can be orphaned and unable to delete without manually deleting the finalizer.
83d2b02
to
78ecded
Compare
/test pull-cluster-api-test-main |
@fabriziopandini Yes I agree - I'd like to see this backported - this bug is affecting us in v0.3.x so a new v0.3.15 release including this fix would be really appreciated if at all possible. |
/lgtm @jimmidyson please open a backport PR against the release-0.3 branch. Thanks for catching and fixing this! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CecileRobertMichon 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 |
@CecileRobertMichon Backported in #4299 😄 |
What this PR does / why we need it:
Without this, machinepool descendeants are ignored in descendant count deletion logic and can be orphaned and unable to delete without manually deleting the finalizer.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #4296