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

Fix PidPressure, and add fork-bomb e2e-node test #72844

Merged
merged 1 commit into from Jan 16, 2019

Conversation

@dashpole
Copy link
Contributor

dashpole commented Jan 12, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
As @derekwaynecarr noted at sig-node, the PidPressure condition hasn't been functional for some time now. This fixes the PidPressure condition by adding PidPressure to the relevant maps in the eviction manager, including OpForSignal, signalToResource, and signalToRankFunc. signalToRankFunc is only required to enable eviction for PidPressure. OpForSignal and signalToResource are required for PidPressure to surface at all.

As we don't have easily available process metrics, this PR uses only priority as the way to rank pods for eviction in response to PidPressure. While this isn't ideal, it is better than no eviction at all IMO. We can iterate on this if needed.

The e2e node test sets the eviction threshold such that with 10k additional processes the eviction threshold will be crossed, and the fork-bomb container creates 12k processes.

This PR also makes a minor change to the message when a pod fails admission due to pressure, changing the message from "The node was low on resource: [Diskpressure]" to "The node had condition: [DiskPressure]".

It also changes eviction tests to use constants from the eviction api, such as SignalNodeFsAvailable instead of nodefs.available.

Which issue(s) this PR fixes:
Fixes #72654

Does this PR introduce a user-facing change?:

PidPressure evicts pods from lowest priority to highest priority

/assign @dims @derekwaynecarr

@dashpole

This comment has been minimized.

Copy link
Contributor

dashpole commented Jan 12, 2019

/priority important-soon
/kind bug

@@ -40,6 +40,8 @@ const (
Reason = "Evicted"
// nodeLowMessageFmt is the message for evictions due to resource pressure.
nodeLowMessageFmt = "The node was low on resource: %v. "
// nodeLowMessageFmt is the message for evictions due to resource pressure.

This comment has been minimized.

@dims

dims Jan 12, 2019

Member

need to fix this comment?

This comment has been minimized.

@dashpole

dashpole Jan 14, 2019

Contributor

done

@BenTheElder

This comment has been minimized.

Copy link
Member

BenTheElder commented Jan 12, 2019

/cc

@k8s-ci-robot k8s-ci-robot requested a review from BenTheElder Jan 12, 2019

@dashpole dashpole force-pushed the dashpole:fork_bomb_test branch from 4c726df to 8b440c6 Jan 14, 2019

@BenTheElder

This comment has been minimized.

Copy link
Member

BenTheElder commented Jan 16, 2019

/retest

@derekwaynecarr

This comment has been minimized.

Copy link
Member

derekwaynecarr commented Jan 16, 2019

@dashpole thanks for following up on this.

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Jan 16, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 16, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dashpole, derekwaynecarr

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 merged commit 5d19fda into kubernetes:master Jan 16, 2019

18 checks passed

cla/linuxfoundation dashpole authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
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-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
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-local-e2e-containerized Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment