> it will prevent udevd from running the rules against it. Thus
effectively the event will be fired and done, but nothing actually
executed for it.

Interesting, I suspect this is the race we see.  The events emitted but
no actions taken (ie we didn't get our by-partuuid symlink created.

> I somehow wonder if we even need partx call, if we properly flock the
device and trigger udev after everything is done.

Growpart is modifying the partition table of the root device which is
already mounted.  We will not be able to flock the root device since
it's open and mounted.  This is precisely why we need to use the partx
call as it updates the kernel partition table mapping without requiring
an exclusive lock on the device.

> So does growpart create partition? move it? delete/recreate one? i.e
does ADD happen? or like REMOVE & ADD? or maybe it's like just MOVE or
CHANGE? Do we have logs of the emitted events already?

growpart on gpt, uses sgdisk which, deletes and then recreates the
existing partition but with a larger size.

The logs are above, see comment #22 -> #24 and #38.

> Don't like flags, as then we'll have to supported forever =) maybe env
variable? or like simply change in focal and compare focal vs eoan?

This may not matter if we can't flock.  I suspect we'll need to use the
ugly re-trigger events for the disk.  growpart could take the disk it's
pointed at, examine the existing udevadm symlinks associated with this
(via udevadm info --export), perform it's operation, and then post-
operation, trigger the add event on the disk, settle, and confirm that
udevadm info --export contains the same set of links (partuuid ,etc).

-- 
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
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to