Local live-build fails to build images due to chroot/dev/* umount failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
livecd-rootfs (Ubuntu) |
Fix Committed
|
Medium
|
Łukasz Zemczak | ||
Focal |
Fix Released
|
High
|
Łukasz Zemczak |
Bug Description
[Impact]
When running image builds locally by either running live-build directly or using `ubuntu-image classic`, the builds will almost always fail at one stage with an error similar to this:
umount: <PATH>/
This is due to the fact that chroot/dev is bind-mounted, and during unmount, when someone is physically using the build host, umount operations on this tree can be impossible.
Without this basically using ubuntu-image locally to build your own image and/or running test automation on certain infrastructure bits can be impossible.
[Test Case]
(best done in a VM)
* On a focal machine, install ubuntu-image + livecd-rootfs from -proposed.
* Get the gadget: git clone https:/
* Prime the gadget: cd pc-amd64-gadget/; snapcraft prime
* Start the image build: cd ../; sudo ubuntu-image classic -d -O out/ -p ubuntu-cpc -a amd64 -s focal
* Wait for the image to finish building, observe that that the image build succeeded and image files are available in the out/ directory
Without the fix the build will not succeed.
[Where problems could occur]
I can't think of a scenario that could go wrong here. If there is any regression, it would most likely manifest as another image build failure. Regression potential is low here, especially that livecd-rootfs is only used for image builds.
Released for impish with 2.731.