hashicorp / hashicorp/nomad

Add ability to restart both sidecar and task when service check is failing

Open
#10,218 3 comments 1 reaction 0 assignees View on GitHub
theme/consul/connect type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

### Proposal
`check_restart` stanza provides an ability to restart a task when a service check is not passing, but it doesn't restart a sidecar. Sometimes a task can be restarted forever when an problem is actually in a sidecar. A boolean toggle `restart_sidecar`can be added to a `check_restart` stanza to provide an ability to restart both tasks.

### Use-cases
It can be useful when a task cannot connect to a service behind a sidecar

### Attempted Solutions
Now I have to stop a sidecar task manually when receive an alert to fix a problem which happens from time to time

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by locating the check_restart stanza handling and the existing task and sidecar restart paths, then trace how a failing service check triggers a restart. Done means a restart_sidecar toggle can restart both the task and its sidecar while preserving existing behavior when the toggle is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.