Missing LXD configuration message is not friendly
Metadata
Current evaluation
Fixed by PR #436 (commit eda59e9), "fix: require disk device in default lxd profile": is_initialized() now also verifies a disk device with path "/" exists in the default profile, catching uninitialized LXD early. Closed per maintainer comment.
Resolution: closed resolved
Reason: Merged PR canonical/craft-providers#436 (commit eda59e9) extended craft_providers/lxd/installer.py is_initialized() to require a disk device with path "/" in the default LXD profile, replacing the previous devices-only check noted in the issue. @mr-cal closed the issue on 2023-11-20 with "Fixed by #436".
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
We should error out with something higher level like
```
LXD is not setup.
Setup LXD by running `lxd init --auto`
```
This could be done through a specific exception handled nicely in the application or by the exception raised by the library itself.
Or similar ;
We probably want to reassess with @tigarmo and show complete error messages in brief and be somewhat quiet only on quiet
### To Reproduce
- Install a craft application
- Install LXD but do not setup
- run the craft application's pack
### part yaml
_No response_
### Relevant log output
```shell
Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Failed getting root disk: No root device could be found
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by PR #436 (commit eda59e9), "fix: require disk device in default lxd profile": is_initialized() now also verifies a disk device with path "/" exists in the default profile, catching uninitialized LXD early. Closed per maintainer comment. | |
| stealth/space-bunny-alpha | — | closed resolved | Closed as fixed by merged PR #436 (commit eda59e9), which now verifies the default LXD profile has a disk device at '/' and raises an LXDError telling users to run 'lxd init --auto'. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Fixed unhelpful LXD error message by adding a check for LXD setup, replacing the cryptic 'No root device could be found' with a clear prompt to run `lxd init --auto`. Resolved in #436. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/craft-providers#436
(confidence 97%)
Merged PR adding the root-disk check to the default LXD profile, referenced in the closing comment.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #436 fix: require disk device in default lxd profile | craft-providers | merged | PR #436 (commit eda59e9) merged into main. is_initialized() in craft_providers/lxd/installer.py now also requires a disk device with path "/" in the default profile, fixing #429 (CRAFT-2174) with new unit tests. |