-
Notifications
You must be signed in to change notification settings - Fork 75
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
Multi-base charm uses same LXC container for different bases #2058
Comments
Good catch, thanks! @mr-cal thinks we have a craft-providers bug related to this, and if not this is probably something to address in craft-application, but this is definitely a blocker for 3.3. |
Thank you for reporting your feedback to us! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3847.
|
Thank you for reporting your feedback to us! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3848.
|
To be clear, charmcraft is building each charm in the correct build environment. So the artifacts are correct but this is inconvenient for iterative development. The problem is that the same container name is re-used, so charmcraft is having to recreate the container every time charmcraft builds on a different base. This has come up in canonical/craft-providers#544. Now I'm wondering if encoding the platform name in the lxc container is the right move. |
Upstream issue: canonical/craft-application#600 |
Bug Description
When packing a charm with
charmcraft uses the same LXC container for both platforms. This means that if you pack the 20.04 charm, then the 22.04 charm, and then the 20.04 charm, the 3rd pack will be slow because the container from the 1st pack was overriden
Expected behavior
charmcraft uses different LXC containers for each platform. (In aforementioned example) the 3rd pack is fast because it reuses the container from the 1st pack
To Reproduce
Environment
Ubuntu 22.04
charmcraft.yaml
Relevant log output
Starting charmcraft, version 3.2.2.post133+g455880a4 Logging execution to '/home/ubuntu/.local/state/charmcraft/log/charmcraft-20241220-092903.384319.log' Launching managed ubuntu 20.04 instance... Creating new instance from remote Creating new base instance from remote Creating new instance from base instance Starting instance Starting charmcraft, version 3.2.2.post133+g455880a4 [...] Packing... Packing charm mysql-router_ubuntu@20.04:amd64.charm Packed mysql-router_ubuntu@20.04:amd64.charm Launching managed ubuntu 22.04 instance... Starting instance Creating instance from base instance Starting instance Starting charmcraft, version 3.2.2.post133+g455880a4 [...] Packing... Packing charm mysql-router_ubuntu@22.04:amd64.charm Packed mysql-router_ubuntu@22.04:amd64.charm
The text was updated successfully, but these errors were encountered: