← Back to issue list

clean up stale containers

View original Github issue

Metadata

Project
snapcraft
Number
#1456
Type
issue
State
closed
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Stale LXD build-container cleanup was implemented in merged PR #1587 (commit daca4618b), moving cleanup into the LXD clean lifecycle.

Resolution: closed resolved

Reason: Merged PR #1587, commit daca4618b, moved LXD cleanup into lxd.py's clean() path so snapcraft clean removes leftover build containers. PR #1655 later refined step-specific cleanup behavior.

Evaluated by: mr-cal-bot

No scores available.

Issue body

[design](https://forum.snapcraft.io/t/clean-up-stale-lxd-containers-created-by-snapcraft/952/1)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Stale LXD build-container cleanup was implemented in merged PR #1587 (commit daca4618b), moving cleanup into the LXD clean lifecycle.
stealth/space-bunny-alpha — closed stale Clean-up design for stale LXD build containers was closed without an identified implementation. The discussion was left on the Snapcraft forum, with no resolving PR or commit found.
qwen/qwen3.6-35b-a3b — — Closed without implementation. Links to an external design discussion for cleaning up stale LXD containers created by snapcraft. No code changes were applied, indicating the request was abandoned or deferred pending design decisions.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The stale container cleanup request was abandoned, with no code changes, fixes, or alternative resolutions documented.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution or implementation. The issue referenced a forum design for cleaning up stale LXD containers created by snapcraft but received no comments or commits, indicating it was abandoned due to inactivity.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#1587 (confidence 94%)

    Merged cleanup implementation for leftover LXD build containers.

  • Related To: snapcraft#1655 (confidence 82%)

    Follow-up PR distinguishing argless clean from clean -s pull.

Related issues

Issue Project State Summary Similarity
#1587 lifecycle: clean after deleting container snapcraft merged Merged PR #1587 (commit daca4618b): LXD cleanup logic moved into lxd.py's clean() so `snapcraft clean` removes leftover build containers, addressing the forum-reported container-build clean issue.
81%
#1762 lxd: delete container only if parts is empty snapcraft merged Merged PR #1762 (dbce9a058), changing LXD cleanup to delete a build container only after all parts are removed, preserving it for targeted cleans and making repeated cleans safe.
77%
#459 Remove LXD container once we've finished a build snapcraft closed Closed unmerged: testing showed cleanbuild already destroyed its LXD containers; the startup failure was fixed separately by merged PR #458 (f78b1e3a3).
71%
#1230 lxd: refactor Cleanbuilder into Containerbuild and add Project. snapcraft merged Merged PR #1230 (ce66ca561) replaced Cleanbuilder with a Containerbuild base class and added Project to create and reuse project-named LXD containers.
71%
#1434 lxd: clean with no parts should only delete snapcraft merged Merged #1434 in commit 33c7a6bc1, making argless LXD clean delete container resources without executing commands inside the container.
70%