← Back to issue list

chroot: mark /dev mount as private

View original Github issue

Metadata

Project
craft-parts
Number
#400
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #400 as commit 21bbb6dd, making chroot /dev bind mounts recursively private to prevent shared-mount unmount propagation.

Resolution: closed resolved

Reason: The approved PR was merged into main as commit 21bbb6dd, changing the chroot /dev rbind mount to use --make-rprivate.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Address shared mount issues affecting /dev mount in chroots. This is a result of https://github.com/lxc/lxc/pull/4229 (container rootfs became a shared mount, meaning that unmounts propagates through the shared group and original mounts are unmounted too). See https://github.com/canonical/rockcraft/issues/195 for details. - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #400 as commit 21bbb6dd, making chroot /dev bind mounts recursively private to prevent shared-mount unmount propagation.
stealth/space-bunny-alpha — closed resolved Merged in canonical/craft-parts#400 (commit 21bbb6dd), marking chroot /dev private to prevent shared-rootfs unmount propagation affecting Rockcraft builds.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Marks the /dev mount as private in chroots to stop unmount propagation from the shared container rootfs added in PR #4229. Closes rockcraft issue #195.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/rockcraft#195 (confidence 100%)

    Rockcraft issue cited as the context and impact of the mount-propagation failure.

  • Caused By: lxc#4229 (confidence 100%)

    The PR body identifies this LXC shared-rootfs change as the cause of the mount-propagation problem.

Related issues

Issue Project State Summary Similarity
#1348 fix: Make mounted devices private before recursively unmounting the chroot craft-parts merged Merged PR #1348 fixed chroot cleanup by making device mounts private and recursively unmounting package-created submounts; commit aea85f07 closes #1344.
84%
#401 Release 1.18.4 craft-parts merged Merged release PR #401 published craft-parts 1.18.4, incorporating the fix from #400 (commit 21bbb6dd) to make the chroot /dev mount private.
72%
#295 chroot: fix device nodes in overlay base image craft-parts merged Merged PR #295 in commit 8e600540, switching overlay chroot /dev mounts to recursive binds so device nodes appear correctly in containers.
72%
#1344 More robust chroot unmounting craft-parts closed Fixed in canonical/craft-parts#1348 (commit aea85f07) by making chroot mounts private before recursively unmounting package-created submounts.
72%