aws / aws/containers-roadmap

[Fargate] [request]: Options for scheduled tasks with failing healthcheck

Open
#161 0 comments 2 reactions 0 assignees View on GitHub
ECS Fargate Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

Currently when a scheduled task fails healthcheck it is marked "UNHEALTHY" and allowed to continue running. It would be nice to have options for "Stop the task", "Restart the task" and "Ignore and allow to continue" when setting the schedule.

**Which service(s) is this request for?**
Fargate

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
I have a scheduled task that I only want one copy of running at a time, so it uses dynamo db to set a lock. Sometimes the task gets "stuck", I've set a healthcheck to detect the stuck case and would like the unhealthy task to be stopped so the next scheduled run is free to grab the lock.

**Are you currently working around this issue?**
Currently I have a cloudwatch alarm for when the task hasn't been able to acquire the lock multiple times in a row so I can manually stop the stuck task (planning to write a lambda to do this for me).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how Fargate scheduled tasks currently handle an UNHEALTHY healthcheck and how schedule settings are represented. Compare the requested stop, restart, and ignore behaviors against the single-running-task and DynamoDB-lock use case; done means the supported behavior and configuration are specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.