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

🐛 Delete node explicitly upon deletion of vm #1551

Merged
merged 2 commits into from
Aug 9, 2022

Conversation

aartij17
Copy link
Contributor

@aartij17 aartij17 commented Jun 14, 2022

What this PR does / why we need it:
Reaped nodes (which are Not Ready) by MHC show up in the output of kubectl get nodes. The name of the k8s node is same to the name of the owning CAPI Machine. This PR is a workaround which explicitly attempts to delete the node after the VSphereVM deletion. This PR builds on top of #1521

Which issue(s) this PR fixes:
Fixes #1519

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

Best effort deletion of k8s node when deleting VM

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 14, 2022
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 14, 2022
@aartij17 aartij17 force-pushed the stale-node-deletion branch 2 times, most recently from bf9b91e to d8f9588 Compare June 14, 2022 21:59
This patch adds the logic to delete the k8s node from the cluster
corresponding to the VM. This is necessary in cases where the node is
never in the Ready state which leads to the node never getting removed
from the cluster. This leads to a lot of stale nodes showing on the
cluster with an active MHC.

Co-authored by: Sagar Muchhal <muchhals@vmware.com>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 4, 2022
@srm09 srm09 marked this pull request as ready for review August 4, 2022 05:22
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 4, 2022
@srm09
Copy link
Contributor

srm09 commented Aug 7, 2022

/retest

Signed-off-by: Sagar Muchhal <muchhals@vmware.com>
@srm09 srm09 added this to the v1.4.0 milestone Aug 8, 2022
@srm09
Copy link
Contributor

srm09 commented Aug 8, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 8, 2022
@srm09
Copy link
Contributor

srm09 commented Aug 8, 2022

/assign @yastij

@geetikabatra
Copy link
Contributor

/lgtm

@srm09
Copy link
Contributor

srm09 commented Aug 9, 2022

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: srm09

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 Aug 9, 2022
@k8s-ci-robot k8s-ci-robot merged commit 53be3f3 into kubernetes-sigs:main Aug 9, 2022
k8s-ci-robot added a commit that referenced this pull request Sep 14, 2022
…lease-1.3

Automated cherry pick of #1551: Adds API group to e2e script
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. 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stale nodes left behind on a workload cluster
5 participants