libimage: support parallel tag/untag#1700
Merged
openshift-ci[bot] merged 1 commit intocontainers:mainfrom Oct 19, 2023
Merged
Conversation
Member
Author
|
@vrothberg PTAL |
The c/storage SetNames API is depracated because it is not race free to first get the list of names and then append our new name then write the full list back. Instead a better Add/RemovesNames API has been added. Tag and Untag should use these to prevent race conditions that can be easily reproduce using podman tag in parallel. Tests have been added to ensure it is working correctly. Fixes containers/podman#17515 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Member
|
@flouthoc PTAL |
flouthoc
approved these changes
Oct 19, 2023
Collaborator
flouthoc
left a comment
There was a problem hiding this comment.
LGTM, Thanks this was long pending. I wonder if there are more places were we want to remove SetNames( ? But that is a different issue.
/lgtm
/approve
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, Luap99, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
Author
|
There are no other SetNames() users in podman or c/common, I have not looked at our other projects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The c/storage SetNames API is depracated because it is not race free to first get the list of names and then append our new name then write the full list back. Instead a better Add/RemovesNames API has been added.
Tag and Untag should use these to prevent race conditions that can be easily reproduce using podman tag in parallel. Tests have been added to ensure it is working correctly.
Fixes containers/podman#17515