Skip to content

Concourse Should Automatically Cordon Bad Workers #1965

Open

Description

@rfliam

Feature Request

What challenge are you facing?

Our rather large concourse infrastructure sees fairly frequent worker failures. Item's like full disks, workers hung in bad states, etc. occur. While chasing down, or preventing, all of these bugs would be great "software fails".

A Modest Proposal

Concourse should detect worker level errors (those that result in "orange" build status such as "failed to create volume", etc.) and mark those workers unhealthy, not scheduling or retrying new jobs on them. That concourse will continue to schedule jobs on unhealthy nodes defeats the purpose of a highly available infrastructure.

Activity

  1. william-tran commented on Jan 28, 2018

    @william-tran
    Contributor

    On the k8s helm chart for concourse I added detection of these cases to the liveness probe, which watches the logs for certain strings: https://github.com/kubernetes/charts/blob/ac5f93530406529fb6ad09e76657de807afd25c9/stable/concourse/values.yaml#L466

    Given such a list of errors, it would be nice if the worker could take care of its own retirement and shutdown.

  2. topherbullock commented on Oct 3, 2018

    @topherbullock
    Contributor

    This feels fairly similar to #755 in terms of the complications for defining which errors are because of worker issues (#2581).

    I think once we cover #755 we can come up with some kind of heuristic for when a worker should be considered "unusable" and should be moved to a non-running state.

    This would be important, since we want to ensure things are consistently failing on a worker rather than considering it unusable immediately after some step fails on it.

  3. topherbullock commented on Feb 12, 2019

    @topherbullock
    Contributor

    We're going to start looking into implementing this along with #2928 , and focus on the number of containers as the heuristic for considering a worker 'bad'. #2928 gives the scheduler a better idea of which workers are more ideal from a container count perspective, but this will help when a worker is hitting its max-containers, and we need to back off from using it for a while.

    Maybe we'll need to add a busy state to workers and manage the lifecycle of moving between that state and running.

  4. taylorsilva commented on Jan 6, 2025

    @taylorsilva
    Member

    I think there are some basic things we can check like if the disk space available is low, the worker should mark itself as unhealthy. I think creating some way for the worker to the web nodes "I'm not healthy, leave me alone for a bit" would be a handy lever for the worker to have.

    This is still worth addressing.

  5. arakakimarcelo commented on Apr 12, 2026

    @arakakimarcelo
    Contributor

    @taylorsilva ideas on what should matter besides low disk available?
    Other than cpu, memory, etc.

    Would be nice to think of a metric/group of metrics that could indicate that the worker is suffering.

    I too, struggle to find out if the workers are able to do the work or not, i'm on v6.7.8 now

  6. taylorsilva commented on Apr 14, 2026

    @taylorsilva
    Member

    low disk, memory, and cpu are the only things I've thought of to track. Everything else on a worker falls into the "it depends" category (number of containers and volumes).

    A worker could have only a few containers/volumes, but how much resources (cpu/memory/disk) each container and volume uses depends on what workloads were defined in the pipeline. Could be a simple bash script doing cat and echo, or a build process that takes minutes or tens of minutes.

    We have found that using the limit-active-tasks strategy to be the best in ensuring workers don't fall over: https://concourse-ci.org/docs/operation/container-placement/#the-limit-active-tasks-strategy

    We currently have this set to 2 active task per worker. What you should set this to depends on how big your workers are and what your workloads do on average. For example, a previous place I worked at we had max tasks set to 4. We were mostly doing terraform and ansible stuff and found we could, on average, run four of those per worker before things got terribly slow.

    With the https://ci.concourse-ci.org/ cluster, we set max tasks to 2 because most of our tests and build processes take up a lot of CPU and having more than one running on a worker makes things VERY slow.

    It depends :)

  7. moved this from Icebox to Backlog in Concourse Roadmapon May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions