devstack/lib/cinder_backends
John Griffith 0b9e76f280 Auto add a cinder lvm.conf file
We have a number of issues where LVM scan commands hang during
test runs.  Looking closer at this with strace it turns out
that what seems to be happening is that we're scanning all of the
devices on the node, this includes the loop devices for swift and
other projects as well as the Cinder devices that are being attached
to the system during the test.

This is particularly messy for example when we issue a VG or LV scan
on a device like /dev/vdb and at the same time issue a detach.  The
result is LVM scan commands hanging waiting for timeout.

This patch adds a function to the cinder_backend/lvm module which
is called as the last part of cinder init.  If Cinder LVM is in use
as per cinder.conf this function will copy the default
/etc/lvm/lvm.conf to /etc/cinder/lvm.conf and use the cinder.conf file
and PVS to create filters so that ONLY the devices actually being used
by Cinder are included in scans.

There are two pieces to this fix; the first is to properly setup an
lvm.conf file with filters.  The second step is to merge the Cinder
change that modifies the Cinder LVM commands to specify the lvm.conf
file usage.

The Cinder part of this fix can be found here:
    https://review.openstack.org/#/c/148747/

Change-Id: I962b6e21cbfb6f5612b6c973053d86828ca8071a
Partial-Bug: #1373513
2015-01-22 12:27:58 -07:00
..
ceph Merge "Ability to use a remote Ceph cluster" 2015-01-13 18:16:02 +00:00
glusterfs add shebang lines to all lib files 2014-12-10 11:28:05 -05:00
lvm Auto add a cinder lvm.conf file 2015-01-22 12:27:58 -07:00
netapp_iscsi add shebang lines to all lib files 2014-12-10 11:28:05 -05:00
netapp_nfs add shebang lines to all lib files 2014-12-10 11:28:05 -05:00
nfs add shebang lines to all lib files 2014-12-10 11:28:05 -05:00
solidfire add shebang lines to all lib files 2014-12-10 11:28:05 -05:00
vmdk add shebang lines to all lib files 2014-12-10 11:28:05 -05:00
xiv add shebang lines to all lib files 2014-12-10 11:28:05 -05:00