Merge ~vorlon/launchpad-buildd:devtmpfs into launchpad-buildd:master
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 393e2cc0d6c35c2d2bb47e036b45cd367e01cac4 |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~vorlon/launchpad-buildd:devtmpfs |
Merge into: | launchpad-buildd:master |
Diff against target: |
89 lines (+4/-47) 2 files modified
lpbuildd/target/lxd.py (+2/-20) lpbuildd/target/tests/test_lxd.py (+2/-27) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson (community) | Approve | ||
Review via email: mp+442776@code.launchpad.net |
Commit message
Mount devtmpfs in the lxd container, to make losetup -P work
Description of the change
To address race conditions when using kpartx to expose partitions on loop devices, we would like to move livecd-rootfs to use `losetup -P`, which synchronously creates all of the necessary devices in the kernel without races.
The problem is that the kernel creates these device nodes on devtmpfs - which is not mounted in the container.
Since the lxd target in launchpad-buildd is already a privileged container, I propose simply mounting devtmpfs in the container as well so that the kernel-created device nodes are exposed.
This also lets us remove some other code for manually creating devices as these will be populated by default by the kernel.
I am not confident that the changes here around nvidia device creation are correct. I am assuming these devices will be created automatically on module load but I am not in a position to verify this at the moment.
The dm-* devices are *not* something that would be precreated by the kernel so I think we still need the code to mknod these.
NVIDIA is still special, please keep all that.