From 0768b1462d67c4f40c5e6c4e99ae402d71e23196 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Thu, 19 Feb 2015 16:07:17 -0700 Subject: [PATCH] Remove warnings for long vgs and lvs calls 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 | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py index 4ec4a177e..d9ae406a4 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py @@ -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() -- 2.45.2