Which actually didn't surprise me after thinking about it. systemd-udevd is going to ask for a partition reread when it gets the uevent for loop0 at some point - it doesn't matter if we hold it off until losetup's reread completes. There will always be a window where the partition device files disappear and reappear.
Perhaps we just need a `udevadm wait $rootfs_dev_mapper --settle`.
That kernel change doesn't fix the issue:
https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- noble-dannf- loop/noble/ amd64/l/ livecd- rootfs/ 20240125_ 203808_ 8b5c9@/ log.gz
Which actually didn't surprise me after thinking about it. systemd-udevd is going to ask for a partition reread when it gets the uevent for loop0 at some point - it doesn't matter if we hold it off until losetup's reread completes. There will always be a window where the partition device files disappear and reappear.
Perhaps we just need a `udevadm wait $rootfs_dev_mapper --settle`.