LVM fails to deploy in Trusty - An error occured handling 'vgroot-lvroot': ProcessExecutionError

Bug #1488632 reported by Andres Rodriguez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
High
Unassigned

Bug Description

Need to get 2101 kB of archives.
After this operation, 6836 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libdevmapper-event1.02.1 amd64 2:1.02.77-6ubuntu2 [10.8 kB]
Get:2 http://ppa.launchpad.net/maas-maintainers/experimental/ubuntu/ trusty/main bcache-tools amd64 1.0.7-1~14.04 [17.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main libreadline5 amd64 5.2+dfsg-2 [130 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main watershed amd64 7 [11.4 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ trusty/main lvm2 amd64 2.02.98-6ubuntu2 [470 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ trusty-updates/main mdadm amd64 3.2.5-5ubuntu4.2 [361 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ trusty/main ssl-cert all 1.0.33 [16.6 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ trusty-updates/main postfix amd64 2.11.0-1ubuntu1 [1084 kB]
Preconfiguring packages ...
Fetched 2101 kB in 4s (502 kB/s)
Selecting previously unselected package libdevmapper-event1.02.1:amd64.
(Reading database ... 56007 files and directories currently installed.)
Preparing to unpack .../libdevmapper-event1.02.1_2%3a1.02.77-6ubuntu2_amd64.deb ...
Unpacking libdevmapper-event1.02.1:amd64 (2:1.02.77-6ubuntu2) ...
Selecting previously unselected package libreadline5:amd64.
Preparing to unpack .../libreadline5_5.2+dfsg-2_amd64.deb ...
Unpacking libreadline5:amd64 (5.2+dfsg-2) ...
Selecting previously unselected package bcache-tools.
Preparing to unpack .../bcache-tools_1.0.7-1~14.04_amd64.deb ...
Unpacking bcache-tools (1.0.7-1~14.04) ...
Selecting previously unselected package watershed.
Preparing to unpack .../archives/watershed_7_amd64.deb ...
Unpacking watershed (7) ...
Selecting previously unselected package lvm2.
Preparing to unpack .../lvm2_2.02.98-6ubuntu2_amd64.deb ...
Unpacking lvm2 (2.02.98-6ubuntu2) ...
Selecting previously unselected package mdadm.
Preparing to unpack .../mdadm_3.2.5-5ubuntu4.2_amd64.deb ...
Unpacking mdadm (3.2.5-5ubuntu4.2) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../ssl-cert_1.0.33_all.deb ...
Unpacking ssl-cert (1.0.33) ...
Selecting previously unselected package postfix.
Preparing to unpack .../postfix_2.11.0-1ubuntu1_amd64.deb ...
Unpacking postfix (2.11.0-1ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Setting up libdevmapper-event1.02.1:amd64 (2:1.02.77-6ubuntu2) ...
Setting up libreadline5:amd64 (5.2+dfsg-2) ...
Setting up bcache-tools (1.0.7-1~14.04) ...
update-initramfs: deferring update (trigger activated)
Setting up watershed (7) ...
update-initramfs: deferring update (trigger activated)
Setting up lvm2 (2.02.98-6ubuntu2) ...
update-initramfs: deferring update (trigger activated)
Setting up mdadm (3.2.5-5ubuntu4.2) ...
Generating mdadm.conf... done.
 Removing any system startup links for /etc/init.d/mdadm-raid ...
update-initramfs: deferring update (trigger activated)
/usr/sbin/grub-probe: error: failed to get canonical path of `overlayroot'.
invoke-rc.d: policy-rc.d denied execution of start.
Setting up ssl-cert (1.0.33) ...
hostname: Name or service not known
make-ssl-cert: Could not get FQDN, using "acidic-vest".
make-ssl-cert: You may want to fix your /etc/hosts and/or DNS setup and run
make-ssl-cert: make-ssl-cert generate-default-snakeoil --force-overwrite
make-ssl-cert: again.
Setting up postfix (2.11.0-1ubuntu1) ...
Adding group `postfix' (GID 112) ...
Done.
Adding system user `postfix' (UID 106) ...
Adding new user `postfix' (UID 106) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding tcp map entry to /etc/postfix/dynamicmaps.cf
Adding sqlite map entry to /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 113) ...
Done.
setting myhostname: acidic-vest
setting alias maps
setting alias database
mailname is not a fully qualified domain name. Not changing /etc/mailname.
setting destinations: localdomain, localhost, localhost.localdomain, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
invoke-rc.d: policy-rc.d denied execution of restart.
Processing triggers for libc-bin (2.19-0ubuntu6.3) ...
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-35-generic
cryptsetup: WARNING: failed to detect canonical device of /media/root-ro/
cryptsetup: WARNING: could not determine root device from /etc/fstab
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
mdadm: No arrays found in config file or automatically
File descriptor 3 (socket:[9041]) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 4 (/curtin/configs/config-000.cfg) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 5 (/curtin/configs/config-001.cfg) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 6 (/curtin/configs/config-002.cfg) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 7 (/curtin/configs/config-003.cfg) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 8 (/curtin/configs/config-004.cfg) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 9 (/curtin/configs/config-005.cfg) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 10 (/var/log/curtin/install.log) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 11 (/var/log/curtin/install.log) leaked on vgcreate invocation. Parent PID 1493: python2
File descriptor 12 (/curtin/bin/curtin) leaked on vgcreate invocation. Parent PID 1493: python2
  No physical volume label read from /dev/sda1
  Physical volume "/dev/sda1" successfully created
  Volume group "vgroot" successfully created
File descriptor 3 (socket:[9041]) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 4 (/curtin/configs/config-000.cfg) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 5 (/curtin/configs/config-001.cfg) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 6 (/curtin/configs/config-002.cfg) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 7 (/curtin/configs/config-003.cfg) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 8 (/curtin/configs/config-004.cfg) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 9 (/curtin/configs/config-005.cfg) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 10 (/var/log/curtin/install.log) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 11 (/var/log/curtin/install.log) leaked on lvcreate invocation. Parent PID 1493: python2
File descriptor 12 (/curtin/bin/curtin) leaked on lvcreate invocation. Parent PID 1493: python2
  Logical volume "lvroot" created
Error: /dev/dm-0: unrecognised disk label
An error occured handling 'vgroot-lvroot': ProcessExecutionError - Unexpected error while running command.
Command: ['partprobe', '/dev/vgroot/lvroot']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Unexpected error while running command.
Command: ['partprobe', '/dev/vgroot/lvroot']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -

Revision history for this message
Andres Rodriguez (andreserl) wrote :
summary: - An error occured handling 'vgroot-lvroot': ProcessExecutionError -
- Unexpected error while running command.
+ LVM fails to deploy in Trusty - An error occured handling 'vgroot-
+ lvroot': ProcessExecutionError
Revision history for this message
Ryan Harper (raharper) wrote :

OK, I can reproduce in a trusty vm curtin/launch and this config:

% cat partprobe.yml
early_commands:
  add_repo: ["add-apt-repository", "-y", "ppa:maas-maintainers/experimental"]

partitioning_commands:
    builtin:
    - curtin
    - block-meta
    - custom
storage:
    config:
    - grub_device: true
        id: sda
        model: TOSHIBA THNSNH12
        name: sda
        ptable: msdos
        path: /dev/vdc
        type: disk
        wipe: superblock
    - device: sda
        id: sda-part1
        name: sda-part1
        number: 1
        offset: 2097152B
        size: 128032530432B
        type: partition
        uuid: 19a4ba9c-f70a-4826-bd7c-5639476f7120
        wipe: superblock
    - devices:
        - sda-part1
        id: vgroot
        name: vgroot
        type: lvm_volgroup
        uuid: 884d7eb2-1e72-4807-8ed7-70465626bf1f
    - id: vgroot-lvroot
        name: lvroot
        size: 128031129600B
        type: lvm_partition
        volgroup: vgroot
    - fstype: ext4
        id: vgroot-lvroot_format
        label: root
        type: format
        uuid: a83e1778-f7c7-485a-b2b8-eabce888d4e1
        volume: vgroot-lvroot
    - device: vgroot-lvroot_format
        id: vgroot-lvroot_mount
        path: /
        type: mount
    version: 1

% ./tools/launch -n user,mac=c0:d6:9f:2c:e8:80 -d test1.img:128G ~/download/trusty-server-cloudimg-amd64-disk1.qcow2 -- curtin install --config=partprobe.yml cp:///

Changed in curtin:
status: New → Confirmed
Revision history for this message
Ryan Harper (raharper) wrote :

It appears that we're failing due to this feature/bug in the use of partprobe on an empty (wiped) disk:

https://bugs.launchpad.net/ubuntu/+source/parted/+bug/1104797

note, blockdev --rereadpt fails as well (for likely the same reason, no pt table to read)

We can:

1) update devsync() 's subp call to partprobe to accept rcs=[0,1]
2) come up with some other mechanism to detect and skip partition probing on devices that don't have a partition table.
3) drop devsync use when running trusty (it's not systemd-udevd racy like vivid and newer).

Changed in curtin:
status: Confirmed → Fix Committed
importance: Undecided → High
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Curtin 17.1

This bug is believed to be fixed in curtin in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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