Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Support for split layers #123

Merged
merged 2 commits into from
Mar 24, 2022
Merged

Support for split layers #123

merged 2 commits into from
Mar 24, 2022

Conversation

cgwalters
Copy link
Member

@cgwalters cgwalters commented Oct 22, 2021

Support for split layers

Closes: #69

This is initial basic support for splitting files (objects) from
a commit into separate container image layers, and reassembling
those layers into a commit on the client.

We retain our present logic around e.g. GPG signature verification.

There's a new chunking.rs file which has logic to automatically
factor out things like the kernel/initramfs and large files.

In order to fetch these images client side, we now heavily
intermix/cross the previous code for fetching non-ostree layers.


@cgwalters
Copy link
Member Author

One thing that's clear to me now is that we will need to inject metadata to differentiate between the layers comprising the "ostree base" and all the remaining layers. Because in order to perform SELinux labeling on derived content, we need to know the base.

Alternatively, we just go for #159 which obviates this problem. I am leaning in that direction more and more strongly.

@cgwalters
Copy link
Member Author

If we don't do #159 then instead what I am now realizing is that because docker schema 2 doesn't have any "annotations" unlike oci we'd need to stick that data on the config object. Which in turn blocks on containers/containers-image-proxy-rs#14

@cgwalters
Copy link
Member Author

OK, this is finally in a state where it seems to work! Lifting draft, but it's a huge change so we need careful review and thought. At least the core logic today is only opt-in, you have to ostree container encapsulate --ex-chunked ... to enable it.

@cgwalters cgwalters force-pushed the tar-split branch 5 times, most recently from 8e86c9a to 4fe97f1 Compare March 19, 2022 20:57
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 21, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 22, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 23, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 23, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 23, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
Closes: ostreedev#69

This is initial basic support for splitting files (objects) from
a commit into separate container image layers, and reassembling
those layers into a commit on the client.

We retain our present logic around e.g. GPG signature verification.

There's a new `chunking.rs` file which has logic to automatically
factor out things like the kernel/initramfs and large files.

In order to fetch these images client side, we now heavily
intermix/cross the previous code for fetching non-ostree layers.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 23, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
@cgwalters cgwalters marked this pull request as ready for review March 24, 2022 10:56
@cgwalters
Copy link
Member Author

OK, CI on coreos/rpm-ostree#3478 is passing! I'd like to merge this now, I've fixed the bugs that caused it break the current v0 container format, so while it's a lot of new code, I think the risk is pretty low because most of the new bits are opt-in.

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

Very cool! I've only skimmed this, but it looks sane overall.

@cgwalters cgwalters merged commit 3c0993f into ostreedev:main Mar 24, 2022
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 24, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 29, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/ostree-rs-ext that referenced this pull request Apr 4, 2022
The biggest thing here was the merge of "chunked ostree" support in
ostreedev#123
cascading into various API changes.

But I think it's working, let's cut 0.7 so the next rpm-ostree can
roll in the support.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 4, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 4, 2022
Depends ostreedev/ostree-rs-ext#123

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 4, 2022
The headlining feature here is ostreedev/ostree-rs-ext#123
which adds support for "chunked ostree".

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
cgwalters added a commit to coreos/rpm-ostree that referenced this pull request Apr 6, 2022
The headlining feature here is ostreedev/ostree-rs-ext#123
which adds support for "chunked ostree".

We gain a new `rpm-ostree container-encapsulate` option which
is like `ostree container encapsulate`, but generates chunked
images using the RPM database.

And on the client side, we now know how to handle incremental
updates - chunks that haven't changed won't be redownloaded.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
semver-break A change that requires a semver bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

container: support splitting inputs
3 participants