← Back to issue list

Correctly capture Craft Providers' LXDError

View original Github issue

Metadata

Project
charmcraft
Number
#1098
Type
issue
State
closed
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Craft Providers' LXDError details were being swallowed and shown as a generic 'charmcraft internal error'. Merged PR #1264 (commit fee3074a) fixed logging to print craft-providers error details; shipped in Charmcraft 3.

Resolution: closed resolved

Reason: Merged PR #1264 (commit fee3074a, 'fix(logging): print details errors from craft-providers') updated Charmcraft's error handling to surface craft-providers error details instead of a bare internal error, and lengau closed the issue with 'Fixed in charmcraft 3'.

Evaluated by: mr-cal-bot

No scores available.

Issue body

``` $ charmcraft pack Warning: Base centos 7 daily image may be unstable. charmcraft internal error: LXDError(brief="Failed to launch instance 'charmcraft-centos-2175442-0-0-amd64'.", details="* Command that failed: 'lxc --project charmcraft launch images:centos/7 local:charmcraft-centos-2175442-0-0-amd64 --config security.syscalls.intercept.mknod=true'\n* Command exit code: 1\n* Command output: b'Creating charmcraft-centos-2175442-0-0-amd64\\n\\rRetrieving image: metadata: 100% (935.41MB/s)\\r \\rRetrieving image: rootfs: 1% (1.56MB/s)\\r \\rRetrieving image: rootfs: 2% (2.11MB/s)\\r \\rRetrieving image: rootfs: 3% (2.52MB/s)\\r \\rRetrieving image: rootfs: 4% (2.11MB/s)\\r \\rRetrieving image: rootfs: 5% (1.87MB/s)\\r \\rRetrieving image: rootfs: 6% (1.73MB/s)\\r \\rRetrieving image: rootfs: 7% (1.64MB/s)\\r \\rRetrieving image: rootfs: 8% (1.58MB/s)\\r \\rRetrieving image: rootfs: 9% (1.54MB/s)\\r \\rRetrieving image: rootfs: 10% (1.51MB/s)\\r \\rRetrieving image: rootfs: 10% (1.47MB/s)\\r \\rRetrieving image: rootfs: 11% (1.45MB/s)\\r \\rRetrieving image: rootfs: 12% (1.44MB/s)\\r \\rRetrieving image: rootfs: 13% (1.43MB/s)\\r \\rRetrieving image: rootfs: 14% (1.41MB/s)\\r \\rRetrieving image: rootfs: 15% (1.40MB/s)\\r \\rRetrieving image: rootfs: 16% (1.40MB/s)\\r \\rRetrieving image: rootfs: 17% (1.37MB/s)\\r \\rRetrieving image: rootfs: 18% (1.38MB/s)\\r \\rRetrieving image: rootfs: 19% (1.37MB/s)\\r \\rRetrieving image: rootfs: 20% (1.37MB/s)\\r \\rRetrieving image: rootfs: 20% (1.36MB/s)\\r \\rRetrieving image: rootfs: 21% (1.35MB/s)\\r \\rRetrieving image: rootfs: 22% (1.35MB/s)\\r \\rRetrieving image: rootfs: 23% (1.35MB/s)\\r \\rRetrieving image: rootfs: 24% (1.35MB/s)\\r \\rRetrieving image: rootfs: 25% (1.34MB/s)\\r \\rRetrieving image: rootfs: 26% (1.34MB/s)\\r \\rRetrieving image: rootfs: 27% (1.34MB/s)\\r \\rRetrieving image: rootfs: 28% (1.34MB/s)\\r \\rRetrieving image: rootfs: 29% (1.33MB/s)\\r \\rRetrieving image: rootfs: 30% (1.33MB/s)\\r \\rRetrieving image: rootfs: 31% (1.33MB/s)\\r \\rRetrieving image: rootfs: 32% (1.32MB/s)\\r \\rRetrieving image: rootfs: 33% (1.32MB/s)\\r \\rRetrieving image: rootfs: 34% (1.32MB/s)\\r \\rRetrieving image: rootfs: 35% (1.32MB/s)\\r \\rRetrieving image: rootfs: 36% (1.32MB/s)\\r \\rRetrieving image: rootfs: 37% (1.32MB/s)\\r \\rRetrieving image: rootfs: 38% (1.32MB/s)\\r \\rRetrieving image: rootfs: 39% (1.31MB/s)\\r \\rRetrieving image: rootfs: 40% (1.31MB/s)\\r \\rRetrieving image: rootfs: 41% (1.31MB/s)\\r \\rRetrieving image: rootfs: 42% (1.31MB/s)\\r \\rRetrieving image: rootfs: 43% (1.31MB/s)\\r \\rRetrieving image: rootfs: 44% (1.31MB/s)\\r \\rRetrieving image: rootfs: 45% (1.31MB/s)\\r \\rRetrieving image: rootfs: 46% (1.31MB/s)\\r \\rRetrieving image: rootfs: 47% (1.31MB/s)\\r \\rRetrieving image: rootfs: 48% (1.30MB/s)\\r \\rRetrieving image: rootfs: 49% (1.30MB/s)\\r \\rRetrieving image: rootfs: 50% (1.30MB/s)\\r \\rRetrieving image: rootfs: 51% (1.30MB/s)\\r \\rRetrieving image: rootfs: 52% (1.30MB/s)\\r \\rRetrieving image: rootfs: 53% (1.30MB/s)\\r \\rRetrieving image: rootfs: 54% (1.30MB/s)\\r \\rRetrieving image: rootfs: 55% (1.30MB/s)\\r \\rRetrieving image: rootfs: 56% (1.30MB/s)\\r \\rRetrieving image: rootfs: 57% (1.30MB/s)\\r \\rRetrieving image: rootfs: 58% (1.30MB/s)\\r \\rRetrieving image: rootfs: 59% (1.30MB/s)\\r \\rRetrieving image: rootfs: 60% (1.29MB/s)\\r \\rRetrieving image: rootfs: 61% (1.30MB/s)\\r \\rRetrieving image: rootfs: 62% (1.29MB/s)\\r \\rRetrieving image: rootfs: 63% (1.29MB/s)\\r \\rRetrieving image: rootfs: 64% (1.29MB/s)\\r \\rRetrieving image: rootfs: 65% (1.29MB/s)\\r \\rRetrieving image: rootfs: 66% (1.29MB/s)\\r \\rRetrieving image: rootfs: 67% (1.29MB/s)\\r \\rRetrieving image: rootfs: 68% (1.29MB/s)\\r \\rRetrieving image: rootfs: 69% (1.29MB/s)\\r \\rRetrieving image: rootfs: 70% (1.29MB/s)\\r \\rRetrieving image: rootfs: 71% (1.29MB/s)\\r \\rRetrieving image: rootfs: 72% (1.29MB/s)\\r \\rRetrieving image: rootfs: 73% (1.29MB/s)\\r \\rRetrieving image: rootfs: 74% (1.29MB/s)\\r \\rRetrieving image: rootfs: 75% (1.29MB/s)\\r \\rRetrieving image: rootfs: 76% (1.29MB/s)\\r \\rRetrieving image: rootfs: 77% (1.29MB/s)\\r \\rRetrieving image: rootfs: 78% (1.29MB/s)\\r \\rRetrieving image: rootfs: 79% (1.29MB/s)\\r \\rRetrieving image: rootfs: 80% (1.29MB/s)\\r \\rRetrieving image: rootfs: 81% (1.29MB/s)\\r \\rRetrieving image: rootfs: 82% (1.29MB/s)\\r \\rRetrieving image: rootfs: 83% (1.28MB/s)\\r \\rRetrieving image: rootfs: 84% (1.29MB/s)\\r \\rRetrieving image: rootfs: 85% (1.29MB/s)\\r \\rRetrieving image: rootfs: 86% (1.29MB/s)\\r \\rRetrieving image: rootfs: 87% (1.29MB/s)\\r \\rRetrieving image: rootfs: 88% (1.29MB/s)\\r \\rRetrieving image: rootfs: 89% (1.29MB/s)\\r \\rRetrieving image: rootfs: 90% (1.29MB/s)\\r \\rRetrieving image: rootfs: 91% (1.29MB/s)\\r \\rRetrieving image: rootfs: 92% (1.28MB/s)\\r \\rRetrieving image: rootfs: 93% (1.28MB/s)\\r \\rRetrieving image: rootfs: 94% (1.28MB/s)\\r \\rRetrieving image: rootfs: 95% (1.28MB/s)\\r \\rRetrieving image: rootfs: 96% (1.28MB/s)\\r \\rRetrieving image: rootfs: 97% (1.28MB/s)\\r \\rRetrieving image: rootfs: 98% (1.28MB/s)\\r \\rRetrieving image: rootfs: 99% (1.28MB/s)\\r \\rRetrieving image: rootfs: 100% (1.28MB/s)\\r \\rRetrieving image: Unpack: 100% (3.19GB/s)\\r \\rRetrieving image: Unpack: 100% (3.19GB/s)\\r \\rStarting charmcraft-centos-2175442-0-0-amd64\\n'\n* Command standard error output: b'Error: The image used by this instance requires a CGroupV1 host system\\nTry `lxc info --show-log local:charmcraft-centos-2175442-0-0-amd64` for more info\\n'", resolution=None) Full execution log: '/home/sergiusens/.local/state/charmcraft/log/charmcraft-20230425-121642.509945.log' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Craft Providers' LXDError details were being swallowed and shown as a generic 'charmcraft internal error'. Merged PR #1264 (commit fee3074a) fixed logging to print craft-providers error details; shipped in Charmcraft 3.
stealth/space-bunny-alpha — closed resolved Craft Providers' LXDError handling was corrected in Charmcraft 3, as confirmed by maintainer @lengau when closing the report.
stealth/space-bunny-alpha — closed resolved Fixed in Charmcraft 3 by canonical/charmcraft#1264 (fee3074a), preserving Craft Providers error details, including LXDError, instead of reporting a generic internal error.
stealth/space-bunny-alpha — closed resolved Craft Providers errors now include their details instead of appearing as generic internal errors. Fixed in Charmcraft 3 by PR #1264 (fee3074a).
qwen3.6-35b-a3b-mtp-q6 — — Craft Providers' LXDError handling was corrected. The issue is closed and resolved in charmcraft 3.
qwen/qwen3.6-35b-a3b — — charmcraft pack failed with an unhandled LXDError when LXC instance launch failed due to CGroup version mismatches. The issue was closed after the error handling was fixed in charmcraft 3.
qwen/qwen3.6-35b-a3b — — Unhandled LXDError during LXC instance launch caused charmcraft pack to crash. The exception is now properly captured and handled. Resolved in charmcraft version 3.
qwen3.6-35b-a3b-mtp-q6 — — Correctly capturing Craft Providers' LXDError was fixed in charmcraft 3, resolving LXC instance launch failures during pack commands.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#1264 (confidence 95%)

    Merged PR fixing craft-providers error detail logging via commit fee3074a; confirmed by lengau's closing comment referencing charmcraft 3.

Related issues

Issue Project State Summary Similarity
#4262 LXD errors from Craft Providers not properly presented snapcraft closed Fixed by #4295 (commit 511061252), which catches Craft Providers errors and shows user-friendly messages instead of tracebacks; backported for 7.5 by #4419 (commit 6b2f6d207).
77%
#1264 fix(logging): print details errors from craft-providers charmcraft merged Merged PR #1264 via commit fee3074a, updating logging so errors from craft-providers include their details.
71%