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

Allow craft tools to function inside a LXD parent container when performing a LXD managed build #506

Open
flotter opened this issue Oct 5, 2024 · 1 comment
Labels
Enhancement New feature or request

Comments

@flotter
Copy link

flotter commented Oct 5, 2024

What needs to get done

Please refer to this: https://ubuntu.com/blog/nested-containers-in-lxd

Currently when using spread with a LXD backend, running a craft tool does not appear to be supported using a nested LXD managed build backend. If this is actually supported, then this request is not needed ?

Supporting nested LXD instances in unprivileged containers require both the LXD parent and the LXD child container to have some agreements with regards to idmap ranges.

This feels like a great feature than can be solved inside the common craft libraries, with a documented requirement for the LXD parent container to support this usage case.

Here are some resources on the topic:
https://documentation.ubuntu.com/lxd/en/latest/userns-idmap/

Why it needs to get done

This would expand the places where craft tools would "just work" without requiring provider specific tweaks. One use case is Spread LXD backend running craft tools suing managed builds.

@flotter flotter added the Enhancement New feature or request label Oct 5, 2024
@flotter flotter changed the title Allow craft tools to function inside a LXD container parent Allow craft tools to function inside a LXD parent container when performing a LXD managed build Oct 5, 2024
@mr-cal
Copy link
Contributor

mr-cal commented Oct 7, 2024

This has a similar underpinning to UID configuration as canonical/craft-providers#259. Neither craft-application nor craft-providers exposes these settings for UIDs.

Can you specify what workarounds you did? I'm wondering if this can be fixed in the set up of the outer lxd instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants