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

Option for sidecar tasks to only be killed after main task #10340

Closed
mjm opened this issue Apr 9, 2021 · 2 comments · Fixed by #13055
Closed

Option for sidecar tasks to only be killed after main task #10340

mjm opened this issue Apr 9, 2021 · 2 comments · Fixed by #13055
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/task lifecycle type/bug

Comments

@mjm
Copy link

mjm commented Apr 9, 2021

Proposal

It would be useful to be able to configure a task group such that sidecar tasks, particularly Connect proxies, were not killed until the main task was killed.

Use-cases

I have a job that is essentially a deploy server for my Nomad cluster: it periodically checks for changes and submits jobs to Nomad, then watches for them to complete. When it's done, it publishes a report for the deploy to another service, which it reaches via Connect.

Because sometimes the deploy server itself has changes, the task for it has a large kill timeout (10m) so that it can finish the deploy it's performing before exiting and being replaced by a new version. But by the time it's ready to publish the report, the Connect proxy has already been killed, so the service it's trying to publish to is unreachable.

Attempted Solutions

The high kill_timeout is what I've found to address something like this, and if I wasn't using Connect for this piece, I would probably be good to go. I haven't been able to find an option in Nomad's docs for controlling the lifecycle of tasks within a group.

@shoenig shoenig self-assigned this Apr 12, 2021
@shoenig
Copy link
Contributor

shoenig commented Apr 12, 2021

Hi @mjm, thanks for reporting! Indeed it does seem like a bug that the Connect proxy does not remain alive until kill_signal is issued / kill_timeout has elapsed for all non-sidecar tasks - which I believe is a general problem with our lifecycle implementation. We've got some other work planned in this area following the 1.1 release, and we'll take a look at this as well.

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/task lifecycle type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants