canonical / canonical/craft-application
Bad error report when the lxd instance is already running
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14
- Forks
- 29
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 12
Description
Bug Description
I had a pack command crash for unrelated reasons, which left the lxd instance running. When running craftapp pack again I got the following error:
Launching managed ubuntu 22.04 instance...
Starting instance
Failed to start 'craftapp-hello-on-amd64-for-amd64-1'.
Full execution log: '/home/ubuntu/.local/state/craftapp/log/craftapp-20240703-093523.724743.log'
To Reproduce
Run craftapp pack, and in another terminal run craftapp pack in the same directory again
part yaml
n/a
Relevant log output
2024-07-03 09:35:29.737 craft_providers.lxd.errors.LXDError: Failed to start 'craftapp-hello-on-amd64-for-amd64-1'.
2024-07-03 09:35:29.737 * Command that failed: 'lxc --project craftapp start local:craftapp-hello-on-amd64-for-amd64-1'
2024-07-03 09:35:29.737 * Command exit code: 1
2024-07-03 09:35:29.737 * Command standard error output: b'Error: The instance is already running\n'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the pack command entry point and trace the LXD instance-start path described in the log. Reproduce the issue by running craftapp pack twice in the same directory, then inspect how the 'instance is already running' error is handled. Done means the second command reports a useful, intentional result instead of the raw failed-start error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100