Skip to content

Resources appear unavailable on tagged workers #152

Closed

Description

@code-engine

Hi,

Background:

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-something
  tags: [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.

Any help greatly appreciated.

Activity

  1. concourse-bot commented on Sep 28, 2015

    @concourse-bot

    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:

    • #104306272 Resources appear unavailable on tagged workers
    • #140278941 reopened: Resources appear unavailable on tagged workers
    • #108697718 I can configure a resource's checking to only run on certain tagged workers

    This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

  2. vito commented on Sep 28, 2015

    @vito
    Contributor

    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.

  3. code-engine commented on Sep 29, 2015

    @code-engine
    Author

    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:

    - name: worker
      instances: 1
      resource_pool: workers
      templates:
        - {release: concourse, name: consul-agent}
        - {release: concourse, name: groundcrew}
        - {release: garden-linux, name: garden}
      networks: [{name: concourse}]
      properties:
        garden:
          listen_network: tcp
          listen_address: 0.0.0.0:7777
    
        consul:
          agent:
            servers: {lan: [*discovery_static_ip]}
    
        groundcrew:
          tags: [web]

    Then that worker will not be able to perform any gets, puts or tasks unless it is tagged like so:

    - do:
      - get: some-resource
        trigger: true
        tags: [web]
      - task: so-something
        tags: [web]
        timeout: 10m
        file: path/to/task.yml

    Is this correct? If so, I was a little confused by the error:

    no workers satisfying: resource type 'git'
    
    available workers: 
      - platform 'linux', tag 'web'
    

    As it suggests that there are available workers, but none with a Git resource.

    Thanks again

  4. vito commented on Oct 7, 2015

    @vito
    Contributor

    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.

  5. added a commit that references this issue on Jan 4, 2016
  6. added a commit that references this issue on Aug 17, 2016
  7. 2 remaining items

  8. added a commit that references this issue on Apr 19, 2017
  9. added a commit that references this issue on Mar 29, 2018
  10. kallisti5 commented on Oct 12, 2024

    @kallisti5

    I just want to comment this is kind of a silly thing. It makes your pipelines look like this:

    concourse/pipelines/haiku-bootstrap.yml:    #    tags: ["((worker_tag))"]
    concourse/pipelines/haiku-bootstrap.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-bootstrap.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-bootstrap.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-bootstrap.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-bootstrap.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-continuous.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/haiku-continuous.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/haiku-continuous.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/haiku-continuous.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-continuous.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-continuous.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:  tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/haiku-release.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:    tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:          tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:          tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:#        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    concourse/pipelines/toolchain-builder.yml:        tags: ["((worker_tag))"]
    

    Why wouldn't resources assume they're supposed to be run on the same tagged worker the pipeline is run on?

  11. taylorsilva commented on Oct 21, 2024

    @taylorsilva
    Member

    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.

  12. kallisti5 commented on Oct 21, 2024

    @kallisti5

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions