~gjolly/livecd-rootfs:ubuntu-cpc/device_busy

Last commit made on 2023-08-08
Get this branch:
git clone -b ubuntu-cpc/device_busy https://git.launchpad.net/~gjolly/livecd-rootfs
Only Gauthier Jolly can upload to this branch. If you are Gauthier Jolly please log in for upload directions.

Branch merges

Branch information

Name:
ubuntu-cpc/device_busy
Repository:
lp:~gjolly/livecd-rootfs

Recent commits

1994962... by Gauthier Jolly

functions(umount_partition): wait if device is busy (LP: #2030771)

This is a workaround for a series of issues we had recently when the
e2fsck call would fail with the following error:

+ e2fsck -y -E discard /dev/mapper/loop3p1
e2fsck 1.45.5 (07-Jan-2020)
/dev/mapper/loop3p1 is in use.
e2fsck: Cannot continue, aborting.

While debugging this issue, we realized that:
 1. the device was not mounted anymore at that point
 2. no apparent process inside the LXD container is using this device

Thus, it is possible that something outside of the LXD container is
keeping this device busy.
In the past, we tried adding delay (hence "sleep 30") to avoid this
issue. But the device is sometimes still busy even after 30s. Here we
implement a slightly more advanced workaround by checking the block
device status before continuing.

os.open('$device', os.O_RDONLY | os.O_EXCL)

This is the exact same call as e2fsck is doing to find out if the device
is busy or not.
The map page says:

> In general, the behavior of O_EXCL is undefined if it is used without
> O_CREAT. There is one exception: on Linux 2.6 and later, O_EXCL can be
> used without O_CREAT if pathname refers to a block device. If the block
> device is in use by the system (e.g., mounted), open() fails with the
> error EBUSY.

774b7c6... by Utkarsh Gupta

Update d/ch for 23.10.12 release

7647b02... by Utkarsh Gupta

Merge branch 'drop-more-packages' into ubuntu/master

* drop-more-packages:
  Avoid purging packages for ubuntu-cpc

ca84320... by Utkarsh Gupta

Avoid purging packages for ubuntu-cpc

With the switch to the ubuntu-cloud-minimal seed, we
don't really need to purge anything now. On the contrary,
the purging of packages if not installed, fails with the
exit code of 100.

fb465e6... by Michael Hudson-Doyle

releasing package livecd-rootfs version 23.10.11

4f6f63d... by Michael Hudson-Doyle

Remove additional dependencies from subiquity units as they are now interfering with the boot process. (LP: #2028862)

494ef42... by Łukasz Zemczak

Merge branch 'canary-locale' of git+ssh://git.launchpad.net/livecd-rootfs into ubuntu/master

3522847... by Dan Bungert

changelog

aa2d04b... by Dan Bungert

revert KERNEL_FLAVORS=none

4fc64be... by Łukasz Zemczak

Merge branch 'ubuntu/master' of git+ssh://git.launchpad.net/livecd-rootfs into canary-locale