[ANN] Concourse Pool Boy (detect and release stale pool resource locks)


#1

Hello,

for people using the Concourse pool resource (https://github.com/concourse/pool-resource), there are cases when a lock can be lost and become stale. The Pool Boy will happily clean your pools and bring back to life all your locks.


Hardware in the loop testing
#2

Wouldn’t it make sense to have such an important mechianism like semaphores for pipelines natively in Concourse?

Almost everyone runs into the use case and having the locks of multiple environments in Github is not very scalable and maintainable.

best,
D


#3

Regarding the scalability, I think it depends on the frequency of the acquire/release operations. You can also host the git backing store directly in your infra, there is no need to use bitbucket.

There is an alternative to the resource pool, https://github.com/cloudfoundry-community/locker-resource, that replaces the git backing store with a simple web server, although I haven’t tried it. This should allow way higher scalability.

I am not sure about having this mechanism directly in Concourse, I cannot imagine how it could work directly as additional YAML syntax as opposed to a Concourse resource. As a programmer, I appreciate the big advantage of the Concourse resource concept: it reduces the complexity on Concourse core.

The real problem in my opinion is that, although I always release the locks in a ensure stanza, the release can still fail if the worker fails for any reason. This is why I created the Pool Boy.

- name: acquire-1
  plan:
    - put: acquire-pool
      params: {acquire: true}
    - task: BLAHBLAHBLAH
  ensure:
    put: acquire-pool
    params: {release: acquire-pool}

When the ensure fails, the lock becomes stale.


Hardware in the loop testing
Using concourse as a job scheduler