-
Notifications
You must be signed in to change notification settings - Fork 40.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
Update strategy used to reuse CPUs from init containers in CPUManager #90419
Update strategy used to reuse CPUs from init containers in CPUManager #90419
Conversation
With the old strategy, it was possible for an init container to end up running without some of its CPUs being exclusive if it requested more guaranteed CPUs than the sum of all guaranteed CPUs requested by app containers. Unfortunately, this case was not caught by our unit tests because they didn't validate the state of the defaultCPUSet to ensure there was no overlap with CPUs assigned to containers. This patch updates the strategy to reuse the CPUs assigned to init containers across into app containers, while avoiding this edge case. It also updates the unit tests to now catch this type of error in the future.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: klueska 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 |
/assign @sjenning @klueska my apologies if I'm missing something obvious here... but do you know why its counting you as a "approver"? From the |
@mattjmcnaughton I am an approver in |
On Fri, Apr 24, 2020 at 07:41:09PM -0700, Kevin Klues wrote:
> @klueska my apologies if I'm missing something obvious here... but do you know why its counting you as a "approver"? From the `OWNERS` file, it looks like you're a reviewer
@mattjmcnaughton I am an approver in `pkg/kubelet/cm` which makes me an approver here as well by inheritance
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#90419 (comment)
Ahhh gotcha :) ok, perfect :)
|
/lgtm |
…9-upstream-release-1.18 Automated cherry pick of #90419: Update strategy used to reuse CPUs from init containers in
…able-cpus-strategy Update strategy used to reuse CPUs from init containers in CPUManager
…ners in CPUManager ref: kubernetes/kubernetes#90419 Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
…ners in CPUManager ref: kubernetes/kubernetes#90419 Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
…ers in CPUManager ref: kubernetes/kubernetes#90419 Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
…ers in CPUManager ref: kubernetes/kubernetes#90419 Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
…ers in CPUManager ref: kubernetes/kubernetes#90419 Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
…ers in CPUManager ref: kubernetes/kubernetes#90419 Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
…ers in CPUManager ref: kubernetes#90419 Signed-off-by: Artyom Lukianov <alukiano@redhat.com> Origin-commit: 0f5abeec3de35b44c1d79ff320b40281b13de060
What type of PR is this?
/kind bug
What this PR does / why we need it:
With the old strategy, it was possible for an init container to end up
running without some of its CPUs being exclusive if it requested more
guaranteed CPUs than the sum of all guaranteed CPUs requested by app
containers. Unfortunately, this case was not caught by our unit tests
because they didn't validate the state of the defaultCPUSet to ensure
there was no overlap with CPUs assigned to containers. This patch
updates the strategy to reuse the CPUs assigned to init containers
across into app containers, while avoiding this edge case. It also
updates the unit tests to now catch this type of error in the future.
Does this PR introduce a user-facing change?: