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

krzysztof-jastrzebski
Copy link
Contributor

@krzysztof-jastrzebski krzysztof-jastrzebski 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.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 2, 2019
@krzysztof-jastrzebski
Copy link
Contributor Author

/sig apps

@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 2, 2019
@krzysztof-jastrzebski
Copy link
Contributor Author

/assign @k82cn

@krzysztof-jastrzebski
Copy link
Contributor Author

/cc @k82cn

@k8s-ci-robot k8s-ci-robot requested a review from k82cn April 4, 2019 16:47
@krzysztof-jastrzebski
Copy link
Contributor Author

/cc mikedanese

@k8s-ci-robot k8s-ci-robot requested a review from mikedanese April 4, 2019 16:47
@@ -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 {
Copy link
Member

Choose a reason for hiding this comment

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

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
Copy link
Member

k82cn commented Apr 7, 2019

/approve

@k82cn
Copy link
Member

k82cn commented Apr 7, 2019

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 7, 2019
@k8s-ci-robot
Copy link
Contributor

[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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2019
@k82cn
Copy link
Member

k82cn commented Apr 8, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 8, 2019
@k8s-ci-robot k8s-ci-robot merged commit 8f8d9e2 into kubernetes:master Apr 8, 2019
k8s-ci-robot added a commit that referenced this pull request Apr 9, 2019
…-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
…-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
…-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
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. 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.

Daemonset controller occasionally fails to schedule desired number of pods
3 participants