devstack/lib/cinder_backends
John Griffith 4bf861c76c Create global_filter to avoid scan of missing devs
A while back I added an lvm.conf file with a device filter setting
to try and clean up the LVM hangs in the gate:
  (commit 0b9e76f280)

It turns out this wasn't the real problem, the real problem
is that on an LVS/VGS command LVM  will attempt to open and read
all potential block devices in /dev to see if they have LVM data
on them.  I initially thought the local filter would keep that
from happening, as it turns out the local filter only limits what's
returned AFTER the actual scan process.  In order to keep the scan
from happening at all, either a global_filter needs to be used or
lvmetad needs to be running and enabled.

There are situations in gate tests where /dev/sdX devices are created and
deleted and the result is that we hit situations where LVM tries
to open up devices to check them even if they've been removed.  The
result is we have a blocking open call from LVM that takes approx
60 seconds to time out and fail.

Ubuntu won't have a version of lvmetad until Vivid, so for now
that just leaves the global_filter as an option.

This patch adds the filter routine to the end of stack.sh.  We don't
want to put the routine in lib/cinder_backend/lvm like we had it because
now we have to set the global filter for all LVM commands on the system.
So we put this as one of the last steps in stack.sh and run it if Cinder
is enabled.  This way we can query PV's on the system regardless of what
other services may be running and using LVM and make sure that all of
their devices are added to the filter as well.

Also, make sure we only set this for Ubuntu as Fedora/RHEL variants
utilize lvmetad.

This patch also removes the old change that set the local filter.

DocImpact
Should add this to recommended config for Cinder on systems
that don't have lvmetad, and recommend lvmetad for those that do.

Change-Id: I5d5c48e188cbb9b4208096736807f082bce524e8
Closes-Bug: #1373513
2015-03-18 10:29:29 -06: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 Create global_filter to avoid scan of missing devs 2015-03-18 10:29:29 -06: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