]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove warnings for long vgs and lvs calls
authorJohn Griffith <john.griffith@solidfire.com>
Thu, 19 Feb 2015 23:07:17 +0000 (16:07 -0700)
committerJohn Griffith <john.griffith@solidfire.com>
Mon, 23 Feb 2015 15:55:54 +0000 (08:55 -0700)
We put some warning statements in a while back for
lvs and vgs commands that lasted more than 60 seconds
so we could easily query issues in the gate.

Since then we've made a number of changes to improve our
LVM interactions including the use of an LVM conf file with
a filter for only the VG's Cinder uses.

There's one issue remaining however where during the instance
rescue test in Nova where LVM get's stuck trying to open
devices that no longer exist.  Part of this I think is due
to some manipulation that Nova/KVM does on the attached volume
when the test is run, but also the rescue process in Nova
uses LVM volumes as well and does some moving around and mounting
of devices.

The result is that LVM calls can take quite a while
(greater than 100 seconds) to complete during the rescue process.
This doesn't result in any failures, just that the rescue process
slows things down dramatically and is a pretty heavy process.

Also, the newer versions of process utils include completion
timing in the logs so we don't really need this any longer eve
to query timings and get info.

This patch removes those log statements, and proposes we
document somewhere that rescue operations on a setup that
includes c-vol service and nova-compute service on the same
node will temporarily impact LVM performance.

Change-Id: Iddc8318ba23725990512f5a5945406561818c5ba

cinder/brick/local_dev/lvm.py

index 4ec4a177e8fee833d13d78e46d249abdd57b9313..d9ae406a48f0b2d62d7846a7092b781d8b2510ba 100644 (file)
@@ -21,14 +21,13 @@ import itertools
 import math
 import os
 import re
-import time
 
 from oslo_concurrency import processutils as putils
 from oslo_utils import excutils
 
 from cinder.brick import exception
 from cinder.brick import executor
-from cinder.i18n import _, _LE, _LI, _LW
+from cinder.i18n import _, _LE, _LI
 from cinder.openstack.common import log as logging
 from cinder import utils
 
@@ -266,7 +265,6 @@ class LVM(executor.Executor):
         elif vg_name is not None:
             cmd.append(vg_name)
 
-        lvs_start = time.time()
         try:
             (out, _err) = putils.execute(*cmd,
                                          root_helper=root_helper,
@@ -280,11 +278,6 @@ class LVM(executor.Executor):
                     LOG.info(msg, {'vg': vg_name, 'lv': lv_name})
                     out = None
 
-        total_time = time.time() - lvs_start
-        if total_time > 60:
-            LOG.warning(_LW('Took %s seconds to get logical volume info.'),
-                        total_time)
-
         lv_list = []
         if out is not None:
             volumes = out.split()
@@ -374,15 +367,9 @@ class LVM(executor.Executor):
         if vg_name is not None:
             cmd.append(vg_name)
 
-        start_vgs = time.time()
         (out, _err) = putils.execute(*cmd,
                                      root_helper=root_helper,
                                      run_as_root=True)
-        total_time = time.time() - start_vgs
-        if total_time > 60:
-            LOG.warning(_LW('Took %s seconds to get '
-                            'volume groups.'), total_time)
-
         vg_list = []
         if out is not None:
             vgs = out.split()