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

storage: enable partial images by default #1833

Conversation

giuseppe
Copy link
Member

by default enable pulling a partial image, it is still possible to disable the feature through the configuration file.

@rhatdan @mtrmac

Copy link
Contributor

openshift-ci bot commented Feb 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

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

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.

Code LGTM; but doing this is ~blocked on #1826 and c/image using that API, otherwise power loss can lead to broken stores.


As discussed in chat, having the check for enable_partial_images at the very first entry point (chunked.GetDiffer) would isolate more of the risk.

@mtrmac
Copy link
Collaborator

mtrmac commented Feb 15, 2024

FWIW tests are failing

@giuseppe giuseppe force-pushed the storage-enable-partial-images-by-default branch from d939c0a to 2e77424 Compare February 15, 2024 16:08
@giuseppe
Copy link
Member Author

fixed now

@giuseppe giuseppe force-pushed the storage-enable-partial-images-by-default branch from 2e77424 to b9dbb79 Compare February 15, 2024 17:38
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.

Code LGTM again… still #1826.

@@ -96,7 +96,7 @@ storage of content and can allow the kernel to use less memory when running
containers.

containers/storage supports three keys
* enable_partial_images="true" | "false"
* enable_partial_images="true" | "true"
Copy link
Member

Choose a reason for hiding this comment

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

This looks wrong options is true or falsenot true or true.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

by default enable pulling a partial image, it is still possible to
disable the feature through the configuration file.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
move the check for `enable_partial_images` to GetDiffer so that it
doesn't attempt any operation if the feature is disabled.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe force-pushed the storage-enable-partial-images-by-default branch from b9dbb79 to 8c1cf34 Compare February 15, 2024 20:59
@giuseppe
Copy link
Member Author

Code LGTM again… still #1826.

unblocked now

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.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Feb 16, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 875fc46 into containers:main Feb 16, 2024
18 checks passed
@cgwalters
Copy link
Contributor

Likely fallout in containers/bootc#509 (comment)

@mtrmac
Copy link
Collaborator

mtrmac commented Aug 30, 2024

Likely fallout in containers/bootc#509 (comment)

@cgwalters almost 2 months later … is the cause clear?

I see “corrupted blob, expecting …” from Skopeo proxy in that ticket, reporting that some kind of GetBlob seems to be working incorrectly, which worries me quite a bit.

But the total sequence of operations is not trivially clear from that report, and I’m naively thinking that if we broke podman pull && podman push, there would have been really many reports by now (and, hopefully, CI failures); so is this something much more specific to bootc?

@cgwalters
Copy link
Contributor

Thanks for following up. Still to this day, we haven't really dug into zstd:chunked images and ostree because containers/bootc#20 means it's basically not useful to create them right now - in theory it should be pullable (and most of the time was), but without the actual delta effect.

But the total sequence of operations is not trivially clear from that report, and I’m naively thinking that if we broke podman pull && podman push,

Right but remember "podman pull" is exercising the combination of c/image and c/storage which are wired together for zstd:chunked.

What ostree is doing is more like skopeo copy docker://quay.io/some-zstd-chunked-image oci:ocidir - and actually I guess not even that because that path goes through the whole "copy machinery" where c/image is driving things instead of being pull based. But it's at least a lot closer to "just fetch the blobs for an zstd:chunked images".

@cgwalters
Copy link
Contributor

I guess we could try stress testing this path with just raw code talking to the proxy and calling GetBlob (https://github.com/containers/containers-image-proxy-rs/blob/main/examples/client.rs is a trivial client that doesn't involve anything ostree, etc.)

@mtrmac
Copy link
Collaborator

mtrmac commented Aug 30, 2024

Hum… skopeo copy docker://… non-c/storage:… would not trigger the chunked path at all. That is less likely to be exercised in existing tests, but it’s also simple enough in implementation that I don’t see anything that could obviously be wrong when creating +pushing, or consuming zstd:chunked layers on registries.

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.

4 participants