]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Retry lvremove with ignore_suspended_devices
authorDirk Mueller <dirk@dmllr.de>
Thu, 12 Jun 2014 22:24:23 +0000 (00:24 +0200)
committerDirk Mueller <dirk@dmllr.de>
Fri, 13 Jun 2014 08:42:59 +0000 (10:42 +0200)
commitda9597aed0186e68dbf1c7304b30e49f8e6a54ff
tree77e4534c12ed827b17e8431752b6f36416c8a456
parent863c295f1097757d9494b9e514041bec982c4331
Retry lvremove with ignore_suspended_devices

A lvremove -f might leave behind suspended devices
when it is racing with udev or other processes
still accessing any of the device files. The previous
solution of using lvchange -an on the LV had the
side-effect of deactivating origin LVs alongway in
the thick volume case, which was undesired.

It turns out retrying the deactivation twice and
ignoring the suspended devices on the second iteration
avoids the hang of all LVM operations after an initial
failure.

Change-Id: I0d6fb74084d049ea184e68f2dcc4e74f400b7dbd
Closes-Bug: #1317075
Related-Bug: #1270192
cinder/brick/local_dev/lvm.py