← Back to issue list

`charmcraft pack` fails running `apt update`

View original Github issue

Metadata

Project
charmcraft
Number
#511
Type
issue
State
closed
Author
jamesbeedy
Labels
—
Created
Updated
Closed

Current evaluation

Closed with no Charmcraft code change: maintainers determined the `apt update` failure came from a broken host/LXD (fan bridge) networking setup, not a Charmcraft bug; guidance posted to Charmhub Discourse and the LXD forum.

Resolution: closed not a bug

Reason: The reporter confirmed the fault reproduced in a plain `lxc launch` container, isolating it to their LXD/fan-bridge host setup. Maintainers (sergiusens, then facundobatista) redirected the fix to the LXD side, posting a Charmhub Discourse thread and the Linux Containers forum thread on the LXD 4.12 networking failure as the real source of the solution; no PR or commit was ever merged against this issue.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Running charmcraft pack is resulting in this error https://paste.ubuntu.com/p/7zDF7XHjGF/ This just started happening the other day. I haven't seen it before yesterday in a demo :)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Closed with no Charmcraft code change: maintainers determined the `apt update` failure came from a broken host/LXD (fan bridge) networking setup, not a Charmcraft bug; guidance posted to Charmhub Discourse and the LXD forum.
stealth/space-bunny-alpha — closed not a bug Closed as an out-of-scope LXD/container networking fault (4.12 fan bridge regression), not a Charmcraft bug. No code change; maintainers posted workarounds on Charmhub Discourse and the LXD forum.
stealth/space-bunny-alpha — closed not a bug Closed as an out-of-scope LXD networking fault, not a Charmcraft bug; no code change was made. Guidance was posted on Charmhub Discourse and the LXD forum.
qwen3.6-35b-a3b-mtp-q6 — — Closed as out of scope. The failure stemmed from an LXD container networking bug, not charmcraft. No code changes were implemented; users were directed to external LXD and Discourse discussions for troubleshooting.
qwen/qwen3.6-35b-a3b — — Closed as out of scope. Root cause identified as a host LXD networking configuration issue, not a charmcraft bug. Redirected to community forums for troubleshooting. No code changes implemented, though improved error messaging was suggested for future releases.
qwen/qwen3.6-35b-a3b — — Closed as out of scope. The failure stems from an LXD container networking bug, not Charmcraft. A Discourse post was created for user troubleshooting. No code changes were implemented.
qwen3.6-35b-a3b-mtp-q6 — — Closed as an LXD networking bug, not a Charmcraft defect. Root cause traced to LXD 4.12 container failures. Resolved by documenting the issue in Discourse and Linux Containers forums, with a suggestion to add user-facing error guidance in Charmcraft.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#507 (confidence 90%)

    Another `charmcraft pack` apt failure reported by sed-i in the same thread; traced to a Docker/LXD environment conflict rather than Charmcraft.

  • Blocked By: canonical/charmcraft#560 (confidence 55%)

    Later report of the same LXD-networking-blocks-archive.ubuntu.com symptom; also closed without a Charmcraft fix.

Related issues

Issue Project State Summary Similarity
#815 charmcraft pack fails - connection timed out could not connect charmcraft closed User-reported charmcraft pack failure was a local host/network problem (archive.ubuntu.com/security.ubuntu.com unreachable during apt cache update in the LXD build container). Author rebooted their machine and packing worked again, then self-closed the issue.
80%
#647 `charmcraft build` sometimes fails on `apt install` inside the lxd container charmcraft closed Closed as a duplicate of #567; its dpkg-lock fix merged via PR #745 (commit b1adccd5), adding provider warmup to avoid competing APT updates.
79%
#560 Charmcraft pack is giving error frequently charmcraft closed The failure was traced to external LXD networking blocking access to archive.ubuntu.com during snapd installation; no Charmcraft fix was merged, and the reported firewall workaround did not help.
78%
#1594 Running `charmcraft pack` fails and returns `Instance setup failed. Check LXD logs for more details` charmcraft closed Closed as an environment conflict, not a Charmcraft defect: Docker had changed networking in a way that interfered with LXD, and the reporter confirmed that uninstalling Docker and restarting fixed it.
77%
#660 `charmcraft pack` fails with error writing to lxd unix socket charmcraft closed A transient LXD socket timeout stopped packing; `charmcraft clean` restored operation, the error did not recur, and the reporter closed the report without a code fix.
75%
#823 more transparency for container build in first charmcraft pack charmcraft closed Firewall-blocked LXD setup hung `charmcraft pack` indefinitely on instance network setup. No charmcraft change needed; maintainer tracked the missing timeout in craft-providers and closed the issue.
74%
#646 Failed to inject host Charmcraft snap into target environment charmcraft closed Report of charmcraft 1.4.0 failing to inject the host snap into the LXD build env. Closed without a code fix: a user fixed it with `charmcraft clean --verbose` and lengau closed it in Jan 2024 as not reproducible on current versions.
74%
#749 Charmcraft pack crashed with `cannot install all requested build packages` charmcraft closed Transient Ubuntu archive outage (HTTP 404 fetching zlib1g_1.2.11) made apt fail inside the build container; retry after `charmcraft clean` succeeded. Maintainer facundobatista closed it as out of charmcraft's control, asking for recurring logs.
74%
#1260 Charmcraft hangs or fails with LXD 5.18 charmcraft closed LXD released a fix for the 5.18 image lookup failure; Charmcraft’s separate edge retry hang was fixed by craft-providers#415 (commit da95d03).
73%
#1338 `charmcraft clean` doesn't clean charmcraft closed Closed unresolved: LXD cleanup remained broken in Charmcraft 3, with the changed behavior attributed to craft-application#425, which also closed without a linked fix.
73%