You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Concourse Should Automatically Cordon Bad Workers #1965
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.
Reacted by Marco Molteni, Julien Syx, Gaël Lambert, xlr-8, Chris, John, Diogo Lemos, Ergin Babani, Damjan Georgievski, Will Tran and 5 more
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.
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.
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.
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 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.
Activity
william-tran commentedon Jan 28, 2018
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.
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
topherbullock commentedon Oct 3, 2018
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.
topherbullock commentedon Feb 12, 2019
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
busystate to workers and manage the lifecycle of moving between that state and running.taylorsilva commentedon Jan 6, 2025
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.
arakakimarcelo commentedon Apr 12, 2026
@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
taylorsilva commentedon Apr 14, 2026
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
catandecho, or a build process that takes minutes or tens of minutes.We have found that using the
limit-active-tasksstrategy to be the best in ensuring workers don't fall over: https://concourse-ci.org/docs/operation/container-placement/#the-limit-active-tasks-strategyWe 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 :)