Closed topherbullock closed 9 years ago
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.
sweet emoji art
Reproducible steps:
mkdir -p repo/pool/unclaimed
mkdir -p repo/pool/claimed
cd repo
git init
git add -A
git ci -m 'init pool of resources'
put
on a concourse pipelinegit mv pool/unclaimed/RESOURCE pool/claimed/RESOURCE
git ci -m 'claiming resource from Job A'
git mv pool/claimed/RESOURCE pool/unclaimed/RESOURCE
git ci -m 'unclaiming resource from Job A'
ref=$(git log HEAD --format="%H" | head -1)
git mv pool/unclaimed/RESOURCE pool/claimed/RESOURCE
git ci -m 'claiming resource from Job B'
/opt/resource/in
script on it's ref$ git log --oneline $ref..HEAD -- pool/
869df45 claiming resource from Job B
The following is showing the error message from here.
It looks like a possible solution may be just filtering out subsequent claimed messages.
For example.
$ git log --grep '^claiming' --invert-grep --oneline $ref..HEAD -- pool/
There is no output from this command.
We've tested the above fix on our concourse deployment and we no longer experience the error.
Hello again!
All stories related to this issue have been accepted, so I'm going to automatically close this issue.
At the time of writing, the following stories have been accepted:
If you feel there is still more to be done or have any questions, feel free to reopen!
We have two jobs which try to acquire a lock on the same pool ( with only one lock to acquire ), the first one to acquire the lock failed to release the lock because the second claimed the env immediately after the unclaim commit. Probably related to this check
Job 1
:arrow_up: Env
:arrow_down: Env
bunch of jobs and stuff
:arrow_up: Env
:arrow_down: Env
/
Job 2 :arrow_up: Env
:arrow_down: Env
Commits in Git logs show that Job #2's claim happened immediately after Job #1 's unclaim.