canonical / rockcraft

Tool to create OCI Images using the language from Snapcraft and Charmcraft.
https://documentation.ubuntu.com/rockcraft
GNU General Public License v3.0
39 stars 44 forks source link

Improve the LXD init experience #590

Open sergiusens opened 5 months ago

sergiusens commented 5 months ago

Bug Description

e.g. no lxd init, rockcraft pack, failed with a cryptic message, did lxd init, rockcraft pack again rockcraft should check if LXD is properly installed and configured PO for LXD says there’s an easy way to check for this

To Reproduce

start from clean system

Environment

Ubuntu 24.04 fresh

rockcraft.yaml

.

Relevant log output

.
syncronize-issues-to-jira[bot] commented 5 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3038.

This message was autogenerated

cjdcordeiro commented 5 months ago

This is already in, but we can consider keeping this issue open for a bit longer if we still want to improve a couple of things:

  1. there's a niche corner case: people who have already used an older version of Rockcraft, with a broken LXD setup, and now update the Rockcraft snap, will get into a deadlock, cause the "broken" LXD profile will have already been added to Rockcraft's LXC project, and the new Rockcraft snap will assume it is "correct" cause "if it has been added, it must mean it is valid"...but it's not, and the only solution is to manually delete the profile or re-install lxd
  2. related to 1., it would be nice to consider a future improvement where Rockcraft can a) update its LXD profile, and b) when multiple profiles exist, give users the option to choose which one to use
tigarmo commented 5 months ago

I believe https://github.com/canonical/craft-providers/pull/588 is an attempt to address the first point