]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Deactivate LV before removing
authorDirk Mueller <dirk@dmllr.de>
Fri, 17 Jan 2014 15:45:32 +0000 (16:45 +0100)
committerDirk Mueller <dirk@dmllr.de>
Thu, 13 Feb 2014 17:14:33 +0000 (18:14 +0100)
commit3764cecfc3b0a5b35634b15a4b049f433a8a22de
tree6f521dd4a9c4c75fe588b551d793ee2bda021044
parentae5ae5079e10f2810b8ba5a29fcddcd10f2f9b38
Deactivate LV before removing

With certain versions of LVM2, removing an active LV can end up with

  Unable to deactivate open XXX
  libdevmapper exiting with 1 device(s) still suspended.

which causes any lvm command afterwards to hang endlessly on
trying to access the suspended volume. This seems to be caused
by a race with udev, so lets be conservative and do the deactivation,
then wait for udev and then finish the removal.

Closes-Bug: #1270192

Change-Id: I4703133180567090878ea5047dd29d9f97ad85ab
cinder/brick/local_dev/lvm.py