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: Gate nodes associated with a machine based on resolved .status.providerID #346

Conversation

jonathan-innis
Copy link
Member

@jonathan-innis jonathan-innis commented May 23, 2023

Fixes #

Description

Prior to this change, in the release v0.28.0-rc.1, if a Machine failed to launch, the .status.providerID of the machine could possibly not be resolved. If this was the case, the Machine would eventually get deleted due to a timeout on registration, causing any nodes associated with the machine to also be removed.

In this case, we were not guarding against the case where the providerID has never been resolved, meaning that we were deleting all nodes that had an empty providerID, meaning that Karpenter would delete nodes that weren't managed by it.

This change guards this case so that the next release v0.28.0-rc.2 will not terminate these nodes when machines with empty provider ids are removed.

How was this change tested?

  • make presubmit
  • Manual Testing of Machine failure deletion

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jonathan-innis jonathan-innis force-pushed the gate-node-deletion-provider-id branch from f83254e to c0a3b91 Compare May 23, 2023 21:14
@jonathan-innis jonathan-innis changed the title [DRAFT] fix:Gate nodes associated with a machine based on resolved provider id [DRAFT] fix:Gate nodes associated with a machine based on resolved .status.providerID May 23, 2023
@coveralls
Copy link

coveralls commented May 23, 2023

Pull Request Test Coverage Report for Build 5063074931

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 22 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.02%) to 81.271%

Files with Coverage Reduction New Missed Lines %
pkg/operator/controller/typed.go 2 93.55%
pkg/scheduling/requirements.go 2 98.5%
pkg/controllers/node/controller.go 7 70.59%
pkg/utils/machine/machine.go 11 39.37%
Totals Coverage Status
Change from base Build 4997439332: -0.02%
Covered Lines: 6904
Relevant Lines: 8495

💛 - Coveralls

@jonathan-innis jonathan-innis changed the title [DRAFT] fix:Gate nodes associated with a machine based on resolved .status.providerID fix:Gate nodes associated with a machine based on resolved .status.providerID May 23, 2023
@jonathan-innis jonathan-innis marked this pull request as ready for review May 23, 2023 21:22
@jonathan-innis jonathan-innis requested a review from a team as a code owner May 23, 2023 21:22
@jonathan-innis jonathan-innis force-pushed the gate-node-deletion-provider-id branch 7 times, most recently from 7782457 to a8f6faf Compare May 23, 2023 22:09
@jonathan-innis jonathan-innis changed the title fix:Gate nodes associated with a machine based on resolved .status.providerID fix: Gate nodes associated with a machine based on resolved .status.providerID May 23, 2023
@jonathan-innis jonathan-innis enabled auto-merge (squash) May 23, 2023 22:14
@jonathan-innis jonathan-innis force-pushed the gate-node-deletion-provider-id branch from a8f6faf to bf048a7 Compare May 23, 2023 23:42
go.sum Show resolved Hide resolved
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants