cloud-init growpart race with udev
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-initramfs-tools |
Fix Released
|
Medium
|
Unassigned | ||
cloud-utils |
Fix Released
|
Undecided
|
Unassigned | ||
cloud-initramfs-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Won't Fix
|
Undecided
|
Unassigned | ||
cloud-utils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[impact]
On Azure, it happens regularly (20-30%), that cloud-init's growpart module fails to extend the partition to full size.
Such as in this example:
=======
2019-06-28 12:24:18,666 - util.py[DEBUG]: Running command ['growpart', '--dry-run', '/dev/sda', '1'] with allowed return codes [0] (shell=False, capture=True)
2019-06-28 12:24:19,157 - util.py[DEBUG]: Running command ['growpart', '/dev/sda', '1'] with allowed return codes [0] (shell=False, capture=True)
2019-06-28 12:24:19,726 - util.py[DEBUG]: resize_devices took 1.075 seconds
2019-06-28 12:24:19,726 - handlers.py[DEBUG]: finish: init-network/
2019-06-28 12:24:19,727 - util.py[WARNING]: Running module growpart (<module 'cloudinit.
2019-06-28 12:24:19,727 - util.py[DEBUG]: Running module growpart (<module 'cloudinit.
Traceback (most recent call last):
File "/usr/lib/
freq=freq)
File "/usr/lib/
return self._runners.
File "/usr/lib/
results = functor(*args)
File "/usr/lib/
func=
File "/usr/lib/
ret = func(*args, **kwargs)
File "/usr/lib/
(old, new) = resizer.
File "/usr/lib/
return (before, get_size(partdev))
File "/usr/lib/
fd = os.open(filename, os.O_RDONLY)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/disk/
=======
@rcj suggested this is a race with udev. This seems to only happen on Cosmic and later.
[test case]
slightly unfortunately, the only way we've been able to reliably reproduce this is to get the CPC team to run their tests in azure, so we'll have to rely on them for SRU verification too
[regression potential]
The change is fairly simple and was thoroughly reviewed and tested before it got uploaded to focal, and the backport is trivial so I am confident that the regression potential is slight.
Related branches
- Ryan Harper (community): Approve
-
Diff: 38 lines (+10/-3)2 files modifieddebian/changelog (+9/-2)
growroot/hooks/growroot (+1/-1)
- Michael Hudson-Doyle (community): Approve
- Dimitri John Ledkov (community): Approve
-
Diff: 64 lines (+30/-0)2 files modifiedbin/growpart (+23/-0)
debian/changelog (+7/-0)
Changed in cloud-init: | |
status: | Incomplete → New |
Changed in cloud-init: | |
status: | Incomplete → Confirmed |
Changed in cloud-init: | |
status: | Invalid → New |
tags: | added: id-5dbb311b74e3f364d8f98c56 |
Changed in systemd (Ubuntu): | |
status: | New → Incomplete |
Changed in cloud-utils: | |
status: | New → Fix Committed |
Changed in cloud-utils (Ubuntu): | |
status: | New → Confirmed |
no longer affects: | linux-azure (Ubuntu) |
no longer affects: | systemd (Ubuntu) |
description: | updated |
affects: | cloud-init → cloud-initramfs-tools |
Changed in cloud-initramfs-tools: | |
status: | Incomplete → Fix Released |
Changed in cloud-utils: | |
status: | Fix Committed → Fix Released |
Hi,
Could you run cloud-init collect-logs and attach the tarball provided?
Are there any particular instance specific defaults ?what type, what region? Size of the ephemeral disk?