← Back to issue list

LXD 5.0 fails to build rocks on Ubuntu 22.04

View original Github issue

Metadata

Project
rockcraft
Number
#195
Type
issue
State
closed
Author
twovican
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by making the temporary /dev rbind mount private; Rockcraft commit d2529169 updated craft-parts to 1.18.4, bringing the fix into Rockcraft.

Resolution: closed resolved

Reason: The maintainer confirmed that rockcraft pack succeeded after changing the mount propagation to rprivate. Commit d2529169 updated craft-parts to 1.18.4, incorporating the fix.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When using LXD 5.0 on 22.04, `rockcraft pack` will fail to build. Throwing the following error: `2023-02-14 17:59:07.565 :: 2023-02-14 23:59:06.997 fuse-overlayfs mountpoint='/root/overlay/overlay', args=('-olowerdir=/root/bundles/ubuntu-20.04/rootfs,upperdir=/root/overlay/packages,workdir=/root/overlay/work',) 2023-02-14 17:59:07.565 :: 2023-02-14 23:59:07.020 Failed to mount overlay on /root/overlay/overlay: Command '['fuse-overlayfs', '-olowerdir=/root/bundles/ubuntu-20.04/rootfs,upperdir=/root/overlay/packages,workdir=/root/overlay/work', '/root/overlay/overlay']' returned non-zero exit status 1.` The current workaround is to upgrade LXD to 5.9 stable. Run this: `sudo snap install lxd --channel=5.9/stable` Instead of this: `sudo snap install lxd --channel=5.0/stable`

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by making the temporary /dev rbind mount private; Rockcraft commit d2529169 updated craft-parts to 1.18.4, bringing the fix into Rockcraft.
stealth/space-bunny-alpha — closed resolved LXD 5.0 propagated unmounts out of Rockcraft's chroot, breaking fuse-overlayfs. Craft Parts fixed /dev isolation in canonical/craft-parts#400 (21bbb6dd).
stealth/space-bunny-alpha — closed resolved Fixed in craft-parts PR #1348 (commit aea85f07) by making mounted devices private before unmounting the chroot; applied in Rockcraft after successful verification.
qwen/qwen3.6-35b-a3b — — LXD 5.0 caused rockcraft pack failures due to shared mount propagation breaking fuse-overlayfs. The issue was resolved by applying mount --make-rprivate to prevent unmount propagation. Fix verified and closed after Rockcraft integration.
qwen/qwen3.6-35b-a3b — — LXD 5.0 rockcraft pack failures stemmed from shared mount propagation breaking /dev. Traced to liblxc PR #4229. Applied rprivate mount flag to prevent propagation. Fix merged into Rockcraft, closing the issue.
qwen/qwen3.6-35b-a3b — — LXD 5.0+ shared mount propagation broke rockcraft pack by unmounting /dev entries. Resolved by updating Rockcraft to set /dev as rprivate, preventing unmount propagation. Fixed and closed.
qwen3.6-35b-a3b-mtp-q6 — — Fixed in Rockcraft by setting /dev mount propagation to rprivate, resolving the fuse-overlayfs failure caused by LXD 5's shared mount propagation. The patch landed in craft-parts and the issue was closed.

Update history

No update history recorded yet.

Related work

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

    LXD 5 mount-propagation behavior was identified as the trigger: unmounting the temporary /dev bind could also disrupt the original /dev and break fuse-overlayfs.

Related issues

Issue Project State Summary Similarity
#27 fix: use lxd from "5.21/stable" craft-actions merged Merged #27 as commit fd0ac92, switching Rockcraft Pack from latest/stable to the LXD 5.21/stable LTS channel for reliable overlay support.
79%
#178 `rockcraft` crashes at the `update apt cache` step rockcraft open apt-get update inside LXD build instance fails on GitHub's ubuntu-22.04 runners; maintainers traced it to Docker/LXD iptables clash, not a rockcraft bug, and point to canonical/setup-lxd and canonical/craft-actions rockcraft-pack as fix (now documented).
76%
#7 fix: upgrade LXD to an existing channel craft-actions merged Merged PR #7 in commit 937d4f6, fixing #6 by switching Rockcraft's LXD channel from unavailable 5.9/stable to latest/stable.
72%