Ah, no I think this might be along right lines: udev is calling blkid on
the _partition_ of course, so it can probe for filesystem etc without
looking at the partition table. After it's done that, it does look for
the partition table so it can read the ID_PART_ENTRY_* values from it,
but if it fails to load the partition table it just gives up and still
returns success.

As to how this might happen, well there are certainly moments during
sgdisk's writing of the partition table when the gpt data is not
completely consistent (it contains checksums and is not written
atomically). Two things are still a bit unsatisfactory about this
explanation though: 1) it's a mighty tight race, hitting this with any
regularity borders on the incredible and 2) I have no idea why this only
occurs on Azure on Cosmic up. Although I guess 1) may explain 2) I
suppose.

Setting LIBBLKID_DEBUG=lowprobe in systemd-udevd's environment during a
failing boot would be very interesting to confirm or deny this line of
reasoning -- although this will make udevd produce gobs of output and
possibly disturb any race.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1834875

Title:
  cloud-init growpart race with udev

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1834875/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to