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.4.x #17120

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.4.x.

WARNING automatic cherry-pick of commits failed. Commits will require human attention.

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 force-pushed the backport/b-restore-prerun-error-task-leak/supposedly-ethical-tick branch 2 times, most recently from ff45a59 to 637b835 Compare May 8, 2023 18:17
@hashicorp-cla
Copy link

hashicorp-cla commented May 8, 2023

CLA assistant check
All committers have signed the CLA.

plus MinJob() from nomad/mock/job.go
@gulducat gulducat merged commit f4180fd into release/1.4.x May 9, 2023
@gulducat gulducat deleted the backport/b-restore-prerun-error-task-leak/supposedly-ethical-tick branch May 9, 2023 15:19
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