The old code had a udev rule that would call into the cloud-init python code for each "net|block" device that got added that spiked the CPU when a block device was added which then made the race that seems to exist much more likely to appear.
Given what Dan said above something deeper seems to be still lurking here that probably needs fixing (but will be harder to trigger now).
Fwiw, it looks like the latest core18 edge build that includes https:/ /launchpad. net/ubuntu/ +source/ cloud-init/ 21.4-0ubuntu1~ 18.04.1 make the problem go away. It seems https:/ /bugs.launchpad .net/cloud- init/+bug/ 1946003 is what caused it.
The old code had a udev rule that would call into the cloud-init python code for each "net|block" device that got added that spiked the CPU when a block device was added which then made the race that seems to exist much more likely to appear.
Given what Dan said above something deeper seems to be still lurking here that probably needs fixing (but will be harder to trigger now).