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

Apply zero TerminationGracePeriodSeconds to preemption victims #81384

Open
wants to merge 1 commit into
base: master
from

Conversation

@Huang-Wei
Copy link
Member

commented Aug 13, 2019

What type of PR is this?

/kind cleanup
/kind flake

What this PR does / why we need it:

In the integration test, if we want to verify preemption, the victim pods should be applied with spec.TerminationGracePeriodSeconds = 0 to avoid the chances that the victim pods are alive up to termination second (30 seconds)

Sample usage can be found in:

  • test/integration/scheduler/preemption_test.go
  • test/integration/scheduler/predicates_test.go

Which issue(s) this PR fixes:

May relates #81238.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

/sig scheduling
/cc @hex108

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Huang-Wei

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

@Huang-Wei

This comment has been minimized.

Copy link
Member Author

commented Aug 13, 2019

/retest

1 similar comment
@Huang-Wei

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2019

/retest

@@ -1596,8 +1596,9 @@ func TestPreemptWithPermitPlugin(t *testing.T) {
}

// Create two pods.
waitingPod, err := createPausePod(cs,

This comment has been minimized.

Copy link
@hex108

hex108 Aug 14, 2019

Member

If it is all right, waitingPod will never be bound to a node, so the graceful delete time will be zero by apiserver, I think we do not need to zero it explicitly.

This comment has been minimized.

Copy link
@Huang-Wei

Huang-Wei Aug 14, 2019

Author Member

If apiserver can detect it as an unbound pod and set the grace period to 0, then it makes sense to me, and we may need to dig more on the flake.

However, in code's perspective, explicitly outweighs ambiguity.

@Huang-Wei

This comment has been minimized.

Copy link
Member Author

commented Aug 14, 2019

/hold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.