-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Prefer read/write images over read/only images #8609
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan 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 |
@edsantiago @mtrmac PTAL |
@containers/podman-maintainers 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.
We need a test for it. Too easy to regress if we change change code.
We already have a test; it's disabled. @rhatdan can you try removing the podman/test/e2e/exists_test.go Line 41 in 70284b1
|
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.
If #8176 (comment) is right that the define.ErrMultipleImages
check doesn’t work, this PR does not yet fix all of that bug report.
5c38ec3
to
d6e30c2
Compare
@mtrmac PTAL |
@rhatdan Still #8609 (comment) . |
With additional stores this can happen, since the underlying containers/storage will show an older version of alpine. In this case we will prefer the read/write store, since this was either pulled in a newer version of ":latest" or rebuilt/tagged a newer version of latest. This is the situation that @edsantiago created to see this problem in the first place. |
I’m not talking about different versions, but entirely different images. These are (Your argument for accepting the newer image if both have exactly the same tag matching the user input, instead of failing on any change to the image, sounds very reasonable. I’m not at all sure about matching by ID. But that’s not my primary concern.) |
decdbb3
to
b4c6007
Compare
2264679
to
6c11909
Compare
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.
ACK overall.
Still outstanding:
If #8176 (comment) is right that the
define.ErrMultipleImages
check doesn’t work, this PR does not yet fix all of that bug report.
or maybe split that into a separate tracked issue?
6266b17
to
c1133f1
Compare
With additional stores there is a risk that you could have multiple images with the same name. IE An older image in a read/only store versus a newer version in the read/write store. This patch will ignore multiple images with the same name iff one is read/write and all of the others are read/only. Fixes: containers#8176 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
/lgtm |
With additional stores there is a risk that you could have
multiple images with the same name. IE An older image in a
read/only store versus a newer version in the read/write store.
This patch will ignore multiple images with the same name iff
one is read/write and all of the others are read/only. It will
still return errors if only multiple read/only images or multiple
read/write images exists. Multipl read/write images should be
impossible.
Fixes: #8176
Signed-off-by: Daniel J Walsh dwalsh@redhat.com