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
Resources appear unavailable on tagged workers #152
What I'm trying to achieve, is that certain jobs should only be run on certain tagged workers.
When a worker is tagged in the concourse BOSH manifest like so:
properties:
groundcrew:
tags: [web]
And then implemented in the CI config to make sure that certain tasks are only run on those specific nodes:
- task: do-somethingtags: [web]
When there are no other nodes available (i.e. it is the only node in the worker pool), the following error occurs:
no workers satisfying: resource type 'git'
available workers:
- platform 'linux', tag 'web'
So it is partially working, in that jobs other than those tagged do not get executed on the worker, but the ATC is unable to determine that the worker has a required resource available.
When I look at the worker.json on the node, all of the required resources are there, including Git (it is the only resource required to perform the failing step, hence the only resource that is not satisfied. I believe it would occur with any built in resource). So it could be that it is not being sent in the beacon, it is not being read / passed correctly somewhere between the config and the ATC or something along these lines.
ATC won't place things on tagged workers by default; this is because typically they're tagged for a reason (e.g. living in a private network or on a funny architecture) and shouldn't be considered equivalent to the rest.
You can add tags to your get steps as well, but the other problem would be that we don't have anywhere to put the checking container. We could add support for tagging resources as well (in fact maybe that would be a way to avoid tagging all gets and puts... hmm). Until then I'd just spin up another un-tagged worker for those containers.
Thanks for your response. Just to clarify before closing (for my own understanding and in case it may be helpful to someone else), if a worker is tagged, for example:
Correct, but the missing piece is the container we use for checking, which happens before the build can even run (to detect versions of the resource), and currently cannot be tagged. So you'd need at least one untagged worker at the moment.
Why wouldn't resources assume they're supposed to be run on the same tagged worker the pipeline is run on?
Because there is no way to tell Concourse "run everything in this pipeline on workers with this tag".
We also try to avoid adding "clever" behaviour like this. Some people will be happy with it, then others will decry the loss of control over where things run. ("Why are my checks only running on this one tagged worker?! It never used to do that before").
Changing this behaviour would be a breaking change in Concourse, so it's something to lightly consider.
I agree that this does add a lot to your pipeline configs though 😞
One thought I had looking at this issue again is that it would be nice to have a job.tags key that one could set, which would set the tags key on all steps in the job.plan. One should open a new issue if they want to add such a feature though.
Activity
concourse-bot commentedon Sep 28, 2015
Hi there!
We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.
The current status is as follows:
This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.
vito commentedon Sep 28, 2015
ATC won't place things on tagged workers by default; this is because typically they're tagged for a reason (e.g. living in a private network or on a funny architecture) and shouldn't be considered equivalent to the rest.
You can add
tagsto yourgetsteps as well, but the other problem would be that we don't have anywhere to put the checking container. We could add support for tagging resources as well (in fact maybe that would be a way to avoid tagging allgets andputs... hmm). Until then I'd just spin up another un-tagged worker for those containers.code-engine commentedon Sep 29, 2015
Hi vito,
Thanks for your response. Just to clarify before closing (for my own understanding and in case it may be helpful to someone else), if a worker is tagged, for example:
Then that worker will not be able to perform any
gets,puts or tasks unless it is tagged like so:Is this correct? If so, I was a little confused by the error:
As it suggests that there are available workers, but none with a Git resource.
Thanks again
vito commentedon Oct 7, 2015
Correct, but the missing piece is the container we use for checking, which happens before the build can even run (to detect versions of the resource), and currently cannot be tagged. So you'd need at least one untagged worker at the moment.
bump fly go-flags
bump a *bunch* of dependencies
2 remaining items
vito commentedon Mar 17, 2017
This is available now via http://concourse.ci/configuring-resources.html#resource-tags
bump ginkgo gomega
bump fly jwt-go
concourse: Make sure we tag the resources for the selected worker as …
kallisti5 commentedon Oct 12, 2024
I just want to comment this is kind of a silly thing. It makes your pipelines look like this:
Why wouldn't resources assume they're supposed to be run on the same tagged worker the pipeline is run on?
taylorsilva commentedon Oct 21, 2024
Because there is no way to tell Concourse "run everything in this pipeline on workers with this tag".
We also try to avoid adding "clever" behaviour like this. Some people will be happy with it, then others will decry the loss of control over where things run. ("Why are my checks only running on this one tagged worker?! It never used to do that before").
Changing this behaviour would be a breaking change in Concourse, so it's something to lightly consider.
I agree that this does add a lot to your pipeline configs though 😞
One thought I had looking at this issue again is that it would be nice to have a
job.tagskey that one could set, which would set thetagskey on all steps in thejob.plan. One should open a new issue if they want to add such a feature though.kallisti5 commentedon Oct 21, 2024
Fair enough.
To take a step back, the whole reason we need tags in the first place is because we can't instruct pipelines to run on a "single worker'
Workers end up passing huge resources back and forth over slow links mid pipeline which makes 2 hour jobs take 6+
I've been part of two independent companies now which end up abandoning concourse due to weird scheduling issues like these.