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

Backport of Fix task leak during client restore when allocrunner prerun hook fails into release/1.5.x #17121

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #17104 to be assessed for backporting due to the inclusion of the label backport/1.5.x.

The below text is copied from the body of the original PR.


Fixes #17102 -- I describe the issue more fully there.

My approach here is to stop skipping over allocRunner.runTasks() on prerun error. That way, instead of duplicating more cleanup code, which may change in the future, the same TaskRunner.Run() code that usually handles task cleanup can do what it needs to as appropriate with tasks that fail prerun during the alloc restore process.

In pursuit of that, I made an error-inducing FailHook and added the ability to include it as part of client Config for the client integration test. I could remove the non-Prerun interface implementations, but I figured while I'm at it, may as well make a thing that can be induced to fail at any stage in case it's useful?

@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 230ca60 into release/1.5.x May 8, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-restore-prerun-error-task-leak/hideously-able-piranha branch from 9acec55 to afeba46 Compare May 8, 2023 18:17
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/b-restore-prerun-error-task-leak/hideously-able-piranha branch May 8, 2023 18:17
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.

2 participants