-
Notifications
You must be signed in to change notification settings - Fork 267
Enable to export layers from Additional Layer Store #902
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
Conversation
6665355 to
18ea8c2
Compare
|
@giuseppe Thank you for the review. Fixed them all. |
giuseppe
left a comment
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.
LGTM
|
Changes LGTM in general, but this appears to need a rebase. |
18ea8c2 to
f631bcf
Compare
Currently, layers aquired from additional layer store cannot be exported (e.g. `podman save`, `podman push`). This is because the current additional layer store exposes only *extracted view* of layers. Tar is not reproducible so the runtime cannot reproduce the tar archive that has the same diff ID as the original. This commit solves this issue by introducing a new API "`blob`" to the additional layer store. This file exposes the raw contents of that layer. When *(c/storage).layerStore.Diff is called, it acquires the diff contents from this `blob` file which the same digest as the original layer. Signed-off-by: Kohei Tokunaga <[email protected]>
f631bcf to
2bb8cde
Compare
|
@TomSweeneyRedHat Thanks for the review. Added the comment and rebased. |
|
Can we move this forward? |
rhatdan
left a comment
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.
LGTM
Currently, layers aquired from additional layer store cannot be exported (e.g.
podman save,podman push) as mentioned in #795 (comment).This is because the current additional layer store exposes only extracted view of layers. Tar is not reproducible so the runtime cannot reproduce the tar archive that has the same diff ID as the original.
This commit solves this issue by introducing a new API "
blob" to the following location of the additional layer store. This file exposes the raw contents of that layer. When*(c/storage).layerStore.Diffis called, it acquires the diff contents from thisblobfile which has the same digest as the original layer.Testing
The following example shows how this patch works.
We can manually create an additional layers store using something like the following script:
For example, the following prepares additional layer store that contains
ghcr.io/stargz-containers/python:3.9-esgzat/tmp/storagedemo.At least the following configuration is needed to /etc/containers/storage.conf to enable addtional layer store.
As shown in the following example, this image can aquired from the addtional layer store without pulling.
And this also can be exported to somewhere else because of
blobAPI.