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

🐛 Fix bug where MachinePool Machine ownerRefs weren't updating #9619

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

Jont828
Copy link
Contributor

@Jont828 Jont828 commented Oct 26, 2023

What this PR does / why we need it: The test framework runs a test to ensure that ownerRefs are resilient, i.e. if the ownerRef is deleted, a controller can set it back. The MachinePool controller only checks to see if the MachinePool Machine exists, not that their ownerRefs are up to date. It also removes redundant code for setting the infraMachine ownerRef as that is already being done by the Machine controller.

#8842 is also rebased off of this PR.

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 #

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels Oct 26, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 26, 2023
@Jont828
Copy link
Contributor Author

Jont828 commented Oct 26, 2023

@killianmuldoon @fabriziopandini @sbueringer Here's the bug fix related to the MPM ownerRefs I mentioned in Slack!

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/area machinepool

@k8s-ci-robot k8s-ci-robot added area/machinepool Issues or PRs related to machinepools and removed do-not-merge/needs-area PR is missing an area label labels Oct 26, 2023
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 30, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ec0c53aac60b2e98e02fbd0d121dcd9a5808afb7

@CecileRobertMichon
Copy link
Contributor

Does this need to be cherry-picked in any previous releases?

@Jont828
Copy link
Contributor Author

Jont828 commented Oct 30, 2023

I don't believe so since the ownerRef changes are going to land in the current release.

@CecileRobertMichon
Copy link
Contributor

/assign @killianmuldoon

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks for fixing this @Jont828!

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 1, 2023
@CecileRobertMichon
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 1, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: b601c7d1fec2952b4a6fc2355b6dd2af3c0122a7

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a quick look and AFAICT this isn't running the e2e tests - we should definitely add it there if we want to make this change.

@Jont828 can you update to run MPM in the quick start to ensure this change is working?

test/framework/ownerreference_helpers.go Show resolved Hide resolved
@killianmuldoon
Copy link
Contributor

/test pull-cluster-api-e2e-full-main

@killianmuldoon
Copy link
Contributor

/retest

@CecileRobertMichon
Copy link
Contributor

CecileRobertMichon commented Nov 1, 2023

@killianmuldoon this change is being tested in #8842 which includes the changes in here (and that PR is a pre-requisite in order to be able to test MachinePool Machines with Docker), and that's where the test was failing I believe. This commit was broken out into a separate PR to make reviewing easier and to keep the other one as a reference PR for providers implementing MachinePool Machines.

@killianmuldoon
Copy link
Contributor

Ah - understood. So this PR depends on #8842 being merged first in that case?

@CecileRobertMichon
Copy link
Contributor

It's the opposite, tests won't pass on #8842 without this change being merged first

@killianmuldoon
Copy link
Contributor

/retest

@Jont828
Copy link
Contributor Author

Jont828 commented Nov 1, 2023

@killianmuldoon Thanks for the quick review! It looks like a test flake for the e2e test since it's failing with a webhook issue.

@CecileRobertMichon
Copy link
Contributor

@killianmuldoon are all your comments resolved/addressed?

@killianmuldoon
Copy link
Contributor

/test pull-cluster-api-e2e-full-main

@CecileRobertMichon
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2023
@k8s-ci-robot k8s-ci-robot merged commit 12c2572 into kubernetes-sigs:main Nov 3, 2023
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.6 milestone Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/machinepool Issues or PRs related to machinepools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants