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 alloc_runner: stop sidecar tasks last into release/1.2.x #13323

Conversation

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

Backport

This PR is auto-generated from #13055 to be assessed for backporting due to the inclusion of the label backport/1.2.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.


Closes #10340

This PR addresses a defect where sidecar tasks are stopped prior to their associated main task being successfully stopped. This can create problems in scenarios where the main task can take a long time to shut down, but still need their sidecars to be operational while they finish their shutdown task (e.g. Consul Connect proxy).

This fix includes the following changes:

  • Adds the IsSidecarTask helper method.
  • Refactors other helpers to use IsSidecarTask.
  • Updates the doc string on the hasSidecarTasks method to correctly describe the behavior of the function.
  • Modifies the second kill loop in allocRunner.killTasks to skip shutting down sidecar tasks. This allows the existing logic in allocHandler.handleTaskStateUpdates to shutdown sidecars after the main task has exited as it was designed to do.
  • Renames a variable to avoid package import collision.

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/f-stop-sidecar-after-parent-task/promptly-premium-kingfish branch from 2c4b7df to 245977a Compare June 9, 2022 23:14
@DerekStrickland DerekStrickland self-assigned this Jun 10, 2022
@DerekStrickland DerekStrickland force-pushed the backport/f-stop-sidecar-after-parent-task/promptly-premium-kingfish branch from 245977a to f5ffed0 Compare June 10, 2022 13:32
@DerekStrickland DerekStrickland merged commit b9c93c3 into release/1.2.x Jun 10, 2022
@DerekStrickland DerekStrickland deleted the backport/f-stop-sidecar-after-parent-task/promptly-premium-kingfish branch June 10, 2022 17:30
@github-actions
Copy link

github-actions bot commented Oct 9, 2022

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants