growpart took too much time to complete and conflict with tmpfiles

Bug #1932263 reported by norman shen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-initramfs-tools
New
Undecided
Unassigned

Bug Description

# cloud-init analyze blame | grep growpart
     04.24900s (init-network/config-growpart)

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/block/vda2/partition (quiet=False)
2021-06-17 01:37:52,429 - util.py[DEBUG]: Read 2 bytes from /sys/class/block/vda2/partition
2021-06-17 01:37:52,429 - util.py[DEBUG]: Reading from /sys/devices/pci0000:00/0000:00:05.0/virtio2/block/vda/dev (quiet=False)
2021-06-17 01:37:52,430 - util.py[DEBUG]: Read 6 bytes from /sys/devices/pci0000:00/0000:00:05.0/virtio2/block/vda/dev
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/python3/dist-packages/cloudinit/config/cc_growpart.py", line 156, in resize
    subp.subp(["growpart", diskdev, partnum])
  File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 295, in subp
    cmd=args)
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
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.g8m8DI/pt_update.err: Directory nonexistent
        failed [pt_update:2] pt_update /dev/vda 2
        cat: /tmp/growpart.g8m8DI/pt_update.err: No such file or directory
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.py[DEBUG]: '/' FAILED: failed to resize: disk=/dev/vda, ptnum=2: Unexpected error while running command.
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....

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.