← Back to issue list

More robust chroot unmounting

View original Github issue

Metadata

Project
craft-parts
Number
#1344
Type
issue
State
closed
Author
upils
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Closed and superseded by internal Jira ticket CRAFT-4804. No code changes were merged. The proposed --make-rprivate and --recursive unmounting fix remains unimplemented.

Suggested action:

No scores available.

Issue body

### What needs to get done Rework the unmounting strategy to account for additional mounts created by the installed packages. Adopt a similar strategy as Imagecraft, always remounting the target with `--make-rprivate` and always unmounting with `--recursive`. This approach should also make use of the `--lazy` flag not needed anymore, making the unmounting safer. ### Why it needs to get done Package installation using the `chroot` mechanism of craft-parts can lead to additional mounts created under `/sys` of the chroot. The current approach to unmount `/sys` fail, in turn failing the tool's execution and leaving the building system in a inconsistent state (other mounts not unmounted). This is currently preventing imagecraft from safely using the `overlay-packages` stanza to install packages in the image.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed and superseded by internal Jira ticket CRAFT-4804. No code changes were merged. The proposed --make-rprivate and --recursive unmounting fix remains unimplemented.
qwen/qwen3.6-35b-a3b Closed and superseded by internal Jira ticket CRAFT-4804. No code changes were merged. The issue proposed remounting with --make-rprivate and recursive unmounting to fix chroot failures during package installation.
qwen/qwen3.6-35b-a3b Closed and deferred to internal Jira tracking (CRAFT-4804). No GitHub fix or merge was applied, leaving the chroot unmounting bug unresolved in this repository.
qwen3.6-35b-a3b-mtp-q6 Closed without documented resolution or merge. The proposed chroot unmounting improvements using --make-rprivate and --recursive were not implemented.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#400 chroot: mark /dev mount as private craft-parts merged Merged fix marking /dev mount as private to prevent shared mount propagation in chroots. Resolves unmount cascading caused by rootfs becoming a shared mount, addressing rockcraft#195. Approved and passed CI.
72%
#1348 fix: Make mounted devices private before recursively unmounting the chroot craft-parts merged Merged fix that remounts chroot devices as private before recursive unmounting to properly handle submounts. Resolves #1344. Approved by reviewers and passed all CI checks.
71%