-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libimage: support parallel tag/untag #1700
Conversation
@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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@flouthoc PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
[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
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There are no other SetNames() users in podman or c/common, I have not looked at our other projects. |
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