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

Only delete node object on GCE #13289

Merged
merged 2 commits into from
Mar 6, 2022

Conversation

olemarkus
Copy link
Member

@olemarkus olemarkus commented Feb 18, 2022

I don't see why the GCE CCM shouldn't have deleted the node object before the new kublet registers given that the NodeLifecycle controller runs every 40 seconds ... But until we can test, we keep this for GCE.

/cc @justinsb @hakman @johngmyers

fixes #13259

@olemarkus
Copy link
Member Author

/test ?

@k8s-ci-robot
Copy link
Contributor

@olemarkus: The following commands are available to trigger required jobs:

  • /test pull-e2e-kops-addon-resource-tracking
  • /test pull-e2e-kops-aws-load-balancer-controller
  • /test pull-e2e-kops-metrics-server
  • /test pull-kops-bazel-build
  • /test pull-kops-bazel-test
  • /test pull-kops-e2e-arm64
  • /test pull-kops-e2e-aws-apiserver-nodes
  • /test pull-kops-e2e-aws-cloud-controller-manager
  • /test pull-kops-e2e-aws-ebs-csi-driver
  • /test pull-kops-e2e-aws-external-dns
  • /test pull-kops-e2e-aws-karpenter
  • /test pull-kops-e2e-aws-upgrade-123-ko123-to-klatest-kolatest
  • /test pull-kops-e2e-cni-amazonvpc
  • /test pull-kops-e2e-cni-amazonvpc-ipv6
  • /test pull-kops-e2e-cni-calico
  • /test pull-kops-e2e-cni-calico-ipv6
  • /test pull-kops-e2e-cni-canal
  • /test pull-kops-e2e-cni-cilium
  • /test pull-kops-e2e-cni-cilium-etcd
  • /test pull-kops-e2e-cni-cilium-ipv6
  • /test pull-kops-e2e-cni-flannel
  • /test pull-kops-e2e-cni-kuberouter
  • /test pull-kops-e2e-cni-weave
  • /test pull-kops-e2e-k8s-amzn2
  • /test pull-kops-e2e-k8s-ci
  • /test pull-kops-e2e-k8s-ci-ha
  • /test pull-kops-e2e-k8s-debian10
  • /test pull-kops-e2e-k8s-debian11
  • /test pull-kops-e2e-k8s-docker
  • /test pull-kops-e2e-k8s-gce
  • /test pull-kops-e2e-k8s-gce-calico-u2004-k22-containerd
  • /test pull-kops-e2e-k8s-gce-ci
  • /test pull-kops-e2e-k8s-ubuntu2110
  • /test pull-kops-e2e-k8s-ubuntu2204
  • /test pull-kops-e2e-kubernetes-aws
  • /test pull-kops-e2e-kubernetes-do-kubetest2
  • /test pull-kops-verify-bazel
  • /test pull-kops-verify-boilerplate
  • /test pull-kops-verify-cloudformation
  • /test pull-kops-verify-generated
  • /test pull-kops-verify-gofmt
  • /test pull-kops-verify-golangci-lint
  • /test pull-kops-verify-gomod
  • /test pull-kops-verify-govet
  • /test pull-kops-verify-hashes
  • /test pull-kops-verify-terraform

Use /test all to run the following jobs that were automatically triggered:

  • pull-kops-bazel-build
  • pull-kops-bazel-test
  • pull-kops-e2e-kubernetes-aws
  • pull-kops-verify-bazel
  • pull-kops-verify-boilerplate
  • pull-kops-verify-generated
  • pull-kops-verify-gofmt
  • pull-kops-verify-golangci-lint
  • pull-kops-verify-gomod
  • pull-kops-verify-govet

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@olemarkus
Copy link
Member Author

/test pull-kops-e2e-aws-upgrade-123-ko123-to-klatest-kolatest

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 18, 2022
@olemarkus
Copy link
Member Author

/test pull-kops-e2e-aws-upgrade-123-ko123-to-klatest-kolatest

1 similar comment
@olemarkus
Copy link
Member Author

/test pull-kops-e2e-aws-upgrade-123-ko123-to-klatest-kolatest

@@ -222,17 +222,14 @@ func TestRollingUpdateAllNeedUpdate(t *testing.T) {
case testingclient.PatchAction:
if string(a.GetPatch()) == cordonPatch {
assertCordon(t, a)
assert.Equal(t, "", cordoned, "at most one node cordoned at a time")
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if it would be worthwhile to hook into the TerminateInstances() mock in order to keep all of the testingclient.DeleteAction assertions.

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about it, but it shouldn't actually delete any nodes, so seems strange to test for it.
We are also checking that the ASGs are empty at the end, so we know the terminations take place.

pkg/instancegroups/instancegroups.go Outdated Show resolved Hide resolved
@@ -36,6 +36,7 @@ import (
"k8s.io/klog/v2"
"k8s.io/kubectl/pkg/drain"

"k8s.io/kops/pkg/apis/kops"
Copy link
Member

Choose a reason for hiding this comment

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

Already declared below.

Suggested change
"k8s.io/kops/pkg/apis/kops"

@olemarkus olemarkus force-pushed the no-node-deletion branch 2 times, most recently from 85e2116 to 7f3f67d Compare March 6, 2022 06:27
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 6, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 Mar 6, 2022
@k8s-ci-robot k8s-ci-robot merged commit b0f64a3 into kubernetes:master Mar 6, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Mar 6, 2022
k8s-ci-robot added a commit that referenced this pull request Apr 9, 2022
…289-origin-release-1.22

Automated cherry pick of #13289: Only delete node object on GCE
k8s-ci-robot added a commit that referenced this pull request Apr 9, 2022
…289-origin-release-1.23

Automated cherry pick of #13289: Only delete node object on GCE
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/rolling-update 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubelet recreating node lease after node object has been deleted
4 participants