diff options
author | Simon Westphahl <simon.westphahl@bmw.de> | 2022-02-08 06:40:06 +0100 |
---|---|---|
committer | James E. Blair <jim@acmegating.com> | 2022-02-08 11:43:06 -0800 |
commit | 01b5bb67df397fed69a5e6d3f9e31ecfd4e9cc1f (patch) | |
tree | b1e1af2396b4eefc1c4fd4c0459ed865e63159ec /doc/source/developer | |
parent | 04e8e0183d61f7d773f30a475b6933180f934909 (diff) | |
download | zuul-01b5bb67df397fed69a5e6d3f9e31ecfd4e9cc1f.tar.gz |
Fix leaked semaphore cleanup
The cleanup method of the semaphore handler was accessing the pipelines
without locking and refreshing them. This could lead to the cleanup of
semaphores that were still valid.
To fix this we will change the semaphore handle from
`<item_uuid>-<job_name>` to a dictionary:
{
"buildset_path": <buildset-path>,
"job_name": <job_name>,
}
In the cleanup routine we can then check if the buildset path still
exists. If that's not the case we know that the semaphore was leaked and
can clean it up.
To be backward compatible we will still allow the legacy format of the
handle when acquiring and releasing a semaphore. In the cleanup method
we will ignore the legacy semaphore handles and just log a warning
message.
This change also updates the model API version to 2. To be backward
compatible we will still use the old-style handle format as long as
there are still components with model API <2. We'll also not execute the
cleanup routine in that case.
Change-Id: I8b0706818b0c2793aae11b8d85cc8ff2d70b28fc
Diffstat (limited to 'doc/source/developer')
-rw-r--r-- | doc/source/developer/model-changelog.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/source/developer/model-changelog.rst b/doc/source/developer/model-changelog.rst index 50e55645c..5c45d4c62 100644 --- a/doc/source/developer/model-changelog.rst +++ b/doc/source/developer/model-changelog.rst @@ -31,3 +31,10 @@ Version 1 :Prior Zuul version: 4.11.0 :Description: No change since Version 0. This explicitly records the component versions in ZooKeeper. + +Version 2 +--------- + +:Prior Zuul version: 5.0.0 +:Description: Changes the sempahore handle format from `<item_uuid>-<job_name>` + to a dictionary with buildset path and job name. |