-
Notifications
You must be signed in to change notification settings - Fork 39.1k
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
Do not count soft-deleted pods for scaling purposes in HPA controller #67067
Conversation
/assign @DirectXMan12 |
@kubernetes/sig-autoscaling-pr-reviews EDIT: the right SIG, sorry for the mistype |
/ok-to-test |
How can I pass the test? |
you need to run |
/retest |
How do I pass |
/retest |
@MaciekPytel @jszczepkowski @DirectXMan12 ptal, this issue has been reported as a serious issue in the node failure test for production-grade k8s use. |
test code added. |
/retest |
/remove-sig api-machinery |
The code looks fine here, but I want to clarify what happened. AIUI, when the pods are set as nodelost, they should be deleted shortly thereafter by the node controller, so we shouldn't have an issue with them hanging around forever. Perhaps someone from @kubernetes/sig-node-bugs can weigh in? |
@DirectXMan12 If you expect the node controller to delete the nodelost pod, this is clearly an HPA bug. If the administrator does not forcibly delete the nodelost pod, it will not scale up forever. |
@DirectXMan12 I want to know how the review is currently in progress. I want to avoid rebase. |
@moonek: Those labels are not set on the issue: In response to this:
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. |
@moonek: Those labels are not set on the issue: In response to this:
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. |
@moonek: Those labels are not set on the issue: In response to this:
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. |
/retest |
@DirectXMan12 Is it difficult for this fix to be merged into 1.12? |
@moonek I'd like to get it merged for 1.12. I'm planning on doing one last review pass tomorrow, then approving it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor test-related change, otherwise this is good to go
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you shouldn't be creating the entire object in the if-else
, just setting the DeletionTimestamp
:
pod = v1.Pod{...}
if deletionTimestamp {
pod.DeletionTimestamp = &metav1.Time{Time: time.Now()}
}
Type: v1.PodReady, | ||
Status: podReadiness, | ||
pod := v1.Pod{} | ||
if podDeletionTimestamp == false { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto here
@DirectXMan12 I was also concerned about that part. I modified and re-committed. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: DirectXMan12, moonek 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 |
/retest |
@moonek: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
/retest |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 67067, 67947). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
The metrics of "soft-deleted" pods in general to be deleted should probably not matter for scaling purposes, since they'll be gone "soon", whether they're nodelost or just normally delete.
As long as soft-deleted pods still exist, they prevent normal scale up.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #62845
Special notes for your reviewer:
Release note: