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

Update Job Deletion Logic To Support Force Kill #1694

Merged
merged 6 commits into from
Oct 25, 2022
Merged

Conversation

d80tb7
Copy link
Collaborator

@d80tb7 d80tb7 commented Oct 24, 2022

This changes the executor's job deletion logic so that:

  • The first attempt to delete a job attempts to delete the job while respecting the graceful termination period set on the pod
  • Any subsequent delete attempts that occur within the graceful termination period + killTimeout (killTimeout defaults to 5 minutes but is configurable) are no-ops.
  • Any subsequent delete attempts that occur after graceful termination period + killTimeout attempts to delete the job with a graceful termination of 0 (i.e. force kills the job)

client.Fake.ClearActions()
clusterContext.DeletePods([]*v1.Pod{pod})
clusterContext.ProcessPodsToDelete()
assert.Equal(t, len(client.Fake.Actions()), 2)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here I want to assert that we using a timout of 0 to kill the pod, but it doesn't look like the fake client tells me this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I had a look, I can't see how to get the options passed to the delete call either :(

Possibly google may have some ideas

samclark
samclark previously approved these changes Oct 25, 2022
@d80tb7 d80tb7 merged commit ed2da77 into master Oct 25, 2022
@jimbobby5 jimbobby5 deleted the f/chrisma/force-delete branch October 26, 2022 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants