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

store: Make additionalimagestores optional as layerstore source #1752

Closed
wants to merge 1 commit into from

Conversation

idleroamer
Copy link

Optionally make additionalImageStore independently maintainable by ensuring that layers are not shared between RO and RW storages so that updating/removing RO storages won't break images in RO ones

Closes: #20603

Copy link
Contributor

openshift-ci bot commented Nov 6, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: idleroamer
Once this PR has been reviewed and has the lgtm label, please assign giuseppe for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

Optionally make additionalImageStore independently maintainable
by ensuring that layers are not shared between RO and RW storages
so that updating/removing RO storages won't break images in RO ones

Closes: #20603
Signed-off-by: Mostafa Emami <mustafaemami@gmail.com>
Signed-off-by: 😎Mostafa Emami <mustafaemami@gmail.com>
Copy link
Collaborator

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Copy&pasting from containers/podman#20604 to preserve the comments…

Comment on lines +1113 to +1120
if strings.Contains(store, "|") {
parts := strings.Split(store, "|")
if len(parts) > 1 && parts[1] == "NO_REUSE" {
continue
} else {
store = strings.Split(store, "|")[0]
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can’t see how this would work; layers in these stores would be effectively invisible, but images in those stores would be visible as usual.

The immediate effect is that all images from a no-reuse store are visible but have unresolvable layers = look broken to all existing tooling.

Copy link
Author

Choose a reason for hiding this comment

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

I have tested the changes in 3.X branch, as part of our older software version which manifested the issue and verified basic operations. Admittedly the codebase has changed substantially and the current patch as you described doesn't work anymore.
I will check if there is still a manageable way to introduce the change in main branch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Note use cases like podman history and podman image tree.

Comment on lines +1114 to +1115
parts := strings.Split(store, "|")
if len(parts) > 1 && parts[1] == "NO_REUSE" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can invent an infinite number of new options. Please don’t add ambiguous in-line syntaxes unless there is really no other alternative.

@idleroamer
Copy link
Author

I don't see any way around increasing the complexity to introduce this feature, so I am going to close the PR for now.
I appreciate your support @mtrmac

@idleroamer idleroamer closed this Nov 7, 2023
@rhatdan
Copy link
Member

rhatdan commented Nov 8, 2023

You could bring this up for discussion at the next Cabal meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants