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

fix(oci): Don't delete dependencies of index #1638

Merged
merged 1 commit into from
May 9, 2024

Conversation

LucaSeri
Copy link
Contributor

@LucaSeri LucaSeri commented May 9, 2024

When we package an application it can be the case that we have a dependency on another package (e.g. a kernel). In these cases, the dependency is not actually packed together with our application, instead we just keep a reference to it. The problem arises when we attempt to overwrite such a package. Because all dependencies were previously deleted, this meant that both of the underlying packages would be removed, but only the application would get repackaged, resulting in an app that cannot be run due to missing layers.

Setting this flag to false and not removing dependencies solves this issue, but causes the cache to grow indefinitely, which is less than ideal.

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran make fmt on your commit series before opening this PR;
  • Updated relevant documentation.

Description of changes

When we package an application it can be the case that we have
a dependency on another package (e.g. a kernel). In these cases,
the dependency is not actually packed together with our application,
instead we just keep a reference to it. The problem arises when we
attempt to overwrite such a package. Because all dependencies
were previously deleted, this meant that both of the underlying packages
would be removed, but only the application would get repackaged,
resulting in an app that cannot be run due to missing layers.

Setting this flag to false and not removing dependencies solves this
issue, but causes the cache to grow indefinitely, which is less than
ideal.

Signed-off-by: Luca Seritan <[email protected]>
@LucaSeri
Copy link
Contributor Author

LucaSeri commented May 9, 2024

I opened #1639 to track the implementation of a garbage collection mechanism that will fix the indefinite growth of the cache.

Copy link
Member

@nderjung nderjung left a comment

Choose a reason for hiding this comment

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

Thanks!

@nderjung nderjung merged commit cb30969 into unikraft:staging May 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants