Skip to content
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

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Oct 19, 2023

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

@Luap99
Copy link
Member Author

Luap99 commented Oct 19, 2023

@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>
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@vrothberg
Copy link
Member

@flouthoc PTAL

Copy link
Collaborator

@flouthoc flouthoc left a 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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 19, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Luap99
Copy link
Member Author

Luap99 commented Oct 19, 2023

There are no other SetNames() users in podman or c/common, I have not looked at our other projects.

@openshift-ci openshift-ci bot merged commit 1308935 into containers:main Oct 19, 2023
7 checks passed
@Luap99 Luap99 deleted the parallel-tag branch October 19, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inspection of recently tagged image failed if run 3 or more tag/inspect commands in parallel
3 participants