lvm2 not starting lvm2-lvmetad on package install

Bug #1626166 reported by Dave Chiluk
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Confirmed
Undecided
Unassigned
Xenial
Triaged
Undecided
Unassigned

Bug Description

[Impact]

 * On Xenial after installing lvm2, you must reboot before you are able to run vgcreate.
 * The package installer should be starting lvmetad.service.
 * $ sudo vgcreate localvg
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Please enter a physical volume path.
  Run `vgcreate --help' for more information.

[Test Case]

 * Running the below commands result in the following error.

   $ sudo apt install lvm2
   $ sudo pvcreate /dev/sdb1
   $ sudo vgcreate localvg /dev/sdb1
  /run/lvm/lvmetad.socket: connect failed: No such file or directory
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  Please enter a physical volume path.
  Run `vgcreate --help' for more information.

[Regression Potential]

 * Solution TBD, opening the bug so I don't forget this in the midst of a sprint.

 * discussion of how regressions are most likely to manifest as a result of this change.

 * It is assumed that any SRU candidate patch is well-tested before
   upload and has a low overall risk of regression, but it's important
   to make the effort to think about what ''could'' happen in the
   event of a regression.

 * This both shows the SRU team that the risks have been considered,
   and provides guidance to testers in regression-testing the SRU.

[Other Info]

 * Anything else you think is useful to include
 * Anticipate questions from users, SRU, +1 maintenance, security teams and the Technical Board
 * and address these questions in advance

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lvm2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Indeed the generated /var/lib/dpkg/info/lvm2.postinst does not start lvm2-lvmetad.socket at all, even though debian/rules calls

dh_systemd_start --restart-after-upgrade \
 lvm2-lvmetad.service \
 lvm2-lvmpolld.service
dh_systemd_start --no-restart-on-upgrade \
 lvm2-lvmetad.socket \
 lvm2-lvmpolld.socket

So this could be a bug in dh_systemd_start that misinterprets the --restart arguments, or a more subtle thing -- running the build with DH_VERBOSE=1 should get an insight.

Changed in lvm2 (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

I cannot recreate this on yakkety, there lvm2-lvmetad.socket starts up just fine right after package installation. Can you confirm?

Changed in lvm2 (Ubuntu):
status: Triaged → Fix Released
Changed in lvm2 (Ubuntu Xenial):
status: New → Triaged
Revision history for this message
Dave Chiluk (chiluk) wrote :

I just installed yakkety, and got a similar result. All of the cloud-images and maas images have lvm2 already built in, so this would not be seen there.

$ sudo vgcreate localvg
  Command failed with status code 5.

I installed yakkety like this.
#!/bin/bash
virt-install \
--connect qemu:///system \
--virt-type kvm \
--name yakketylvm \
--ram 2048 \
--disk pool=VMs,size=10 \
--graphics vnc \
-l ftp://ftp.utexas.edu/pub/ubuntu/dists/yakkety/main/installer-amd64/ \
--os-variant ubuntu16.04

Changed in lvm2 (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Dave Chiluk (chiluk) wrote :

I actually also tested this on recent cloud-images of yakkety, and I'm seeing the same thing. That may be a separate issue though as reboot does not fix it there.

Dave Chiluk (chiluk)
description: updated
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.