Re: OSTree and OCI images
- From: Alexander Larsson <alexl redhat com>
- To: Giuseppe Scrivano <gscrivan redhat com>
- Cc: ostree-list gnome org
- Subject: Re: OSTree and OCI images
- Date: Fri, 18 Nov 2016 10:38:57 +0100
On fre, 2016-11-18 at 10:22 +0100, Giuseppe Scrivano wrote:
Alexander Larsson <alexl redhat com> writes:
In fact, if we wanted we could store the references to the
individual
layers (by commit id) in the currently unused "related commits"
part of
the ostree commit GVariant. Then we could teach "ostree prune"
about
this so that we can (optionally) make sure not to remove layers
that
are referenced from installed images.
We are already doing this in atomic, if more projects will do the
same
then it is probably a good idea to move it in OSTree:
https://github.com/projectatomic/atomic/blob/master/Atomic/syscontain
ers.py#L850
I guess these two are not quite the same. Each commit object in ostree
can store a list of "related" commit ids. We can easily make ostree not
prune these when the image is commit is still around. This means that
we can always reconstruct the image based on the ostree commit ids.
However, the code you link to above is not about pruning commits, it is
about pruning branches (which then refer to the above commits). "ostree
prune" will never remove a branch like that. Of course, when pulling a
layer we need to know what ostree commit id the layer id maps to, so we
need the branch to be there, and thus you need some custom branch
pruning. (Unless we store the oci layer id => ostree commit id some
other way.)
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alexander larsson gmail com
He's a one-legged white trash Green Beret moving from town to town,
helping folk in trouble. She's a hard-bitten thirtysomething former first
lady with the power to see death. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]