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 only unscheduled pods in DaemonSetController if node doesn't exist anymore #76060

Merged
merged 1 commit into from Apr 8, 2019

Conversation

Projects
None yet
3 participants
@krzysztof-jastrzebski
Copy link
Contributor

commented Apr 2, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
PR fixes bug introduced in #73401. Behaviour is changed so DaemonSetController deletes pods for non-existing nodes only if PodGCController can't remove them (pods that haven't been scheduled before node was deleted). Previously DaemonSetController stop processing DaemonSet for 5 minutes after node removal, see #75836.
Which issue(s) this PR fixes:
Fixes #75836

Does this PR introduce a user-facing change?:

Fixes bug in DaemonSetController causing it to stop processing some DaemonSets for 5 minutes after node removal.
@krzysztof-jastrzebski

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2019

/sig apps

@k8s-ci-robot k8s-ci-robot added sig/apps and removed needs-sig labels Apr 2, 2019

@krzysztof-jastrzebski

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2019

/assign @k82cn

@krzysztof-jastrzebski

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

/cc @k82cn

@k8s-ci-robot k8s-ci-robot requested a review from k82cn Apr 4, 2019

@krzysztof-jastrzebski

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

/cc mikedanese

@k8s-ci-robot k8s-ci-robot requested a review from mikedanese Apr 4, 2019

@@ -1537,7 +1538,9 @@ func getPodsWithoutNode(runningNodesList []*v1.Node, nodeToDaemonPods map[string
for n, pods := range nodeToDaemonPods {
if !isNodeRunning[n] {
for _, pod := range pods {
results = append(results, pod.Name)
if len(pod.Spec.NodeName) == 0 {

This comment has been minimized.

Copy link
@k82cn

k82cn Apr 7, 2019

Member

LGTM overall; personally, I'd like to add a comment on the scenario that DaemonSet-Controller will delete Pod without NodeName, and PodGC will delete pod has NodeName.

@k82cn

This comment has been minimized.

Copy link
Member

commented Apr 7, 2019

/approve

@k82cn

This comment has been minimized.

Copy link
Member

commented Apr 7, 2019

/priority important-soon

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Apr 7, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: k82cn, krzysztof-jastrzebski

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

@k82cn

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Apr 8, 2019

@k8s-ci-robot k8s-ci-robot merged commit 8f8d9e2 into kubernetes:master Apr 8, 2019

17 checks passed

cla/linuxfoundation krzysztof-jastrzebski authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details

k8s-ci-robot added a commit that referenced this pull request Apr 9, 2019

Merge pull request #76274 from krzysztof-jastrzebski/automated-cherry…
…-pick-of-#76060-upstream-release-1.14

Automated cherry pick of #76060: Delete only unscheduled pods if node doesn't exist anymore.

k8s-ci-robot added a commit that referenced this pull request Apr 15, 2019

Merge pull request #76276 from krzysztof-jastrzebski/automated-cherry…
…-pick-of-#76060-upstream-release-1.12

Automated cherry pick of #76060: Delete only unscheduled pods if node doesn't exist anymore.

k8s-ci-robot added a commit that referenced this pull request May 22, 2019

Merge pull request #76275 from krzysztof-jastrzebski/automated-cherry…
…-pick-of-#76060-upstream-release-1.13

Automated cherry pick of #76060: Delete only unscheduled pods if node doesn't exist anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.