growpart took too much time to complete and conflict with tmpfiles
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-initramfs-tools |
New
|
Undecided
|
Unassigned |
Bug Description
# cloud-init analyze blame | grep growpart
04.24900s (init-network/
2021-06-17 01:37:52,405 - subp.py[DEBUG]: Running command ['growpart', '--help'] with allowed return codes [0] (shell=False, capture=True)
2021-06-17 01:37:52,427 - util.py[DEBUG]: Reading from /proc/489/mountinfo (quiet=False)
2021-06-17 01:37:52,428 - util.py[DEBUG]: Read 2883 bytes from /proc/489/mountinfo
2021-06-17 01:37:52,429 - util.py[DEBUG]: Reading from /sys/class/
2021-06-17 01:37:52,429 - util.py[DEBUG]: Read 2 bytes from /sys/class/
2021-06-17 01:37:52,429 - util.py[DEBUG]: Reading from /sys/devices/
2021-06-17 01:37:52,430 - util.py[DEBUG]: Read 6 bytes from /sys/devices/
2021-06-17 01:37:52,430 - subp.py[DEBUG]: Running command ['growpart', '--dry-run', '/dev/vda', '2'] with allowed return codes [0] (shell=False, capture=True)
2021-06-17 01:37:52,515 - subp.py[DEBUG]: Running command ['growpart', '/dev/vda', '2'] with allowed return codes [0] (shell=False, capture=True)
2021-06-17 01:37:56,633 - util.py[WARNING]: Failed: growpart /dev/vda 2
2021-06-17 01:37:56,634 - util.py[DEBUG]: Failed: growpart /dev/vda 2
Traceback (most recent call last):
File "/usr/lib/
subp.
File "/usr/lib/
cmd=args)
cloudinit.
Command: ['growpart', '/dev/vda', '2']
Exit code: 2
Reason: -
Stdout: FAILED: pt_resize failed
Stderr: /usr/bin/growpart: 554: /usr/bin/growpart: cannot create /tmp/growpart.
failed [pt_update:2] pt_update /dev/vda 2
cat: /tmp/growpart.
2021-06-17 01:37:56,652 - util.py[DEBUG]: resize_devices took 4.224 seconds
2021-06-17 01:37:56,652 - cc_growpart.
Command: ['growpart', '/dev/vda', '2']
Exit code: 2
Reason: -
Stdout: FAILED: pt_resize failed
In the log, it implies that it took 4s to quit with errors. what is more interesting is that partx finally succeeds to extend partition....