Implement an OCI garbage collector #1639
Labels
area/oci
Issue or PR is related to OCI package management
kind/enhancement
New feature or request
priority/low
Nice to have issues thatare not urgent, but can be nagging.
Feature request summary
OCI image packages are stored as layers in the kraftkit runtime directory.
Due to how images are constructed, a layer might be used in more than one package. E.g. two packages might be using the same kernel with a different rootfs. To optimize this, the kernel is not packaged twice, it instead lives in its own layer that is only referenced by the two packages.
The issue occurs when we want to remove a package from our OCI store, as there is currently no reference counting mechanism. This means that we have to pick between two not so great options:
This issue tracks implementing a better garbage collection mechanism to only remove the necessary dependencies.
This involves changes to the
DeleteIndex
method of the different OCI handlers, e.g.:https://github.com/unikraft/kraftkit/blob/staging/oci/handler/directory.go#L1087
Describe alternatives
No response
Related architectures
None
Related platforms
None
Additional context
No response
The text was updated successfully, but these errors were encountered: