From d322bb891dbaf420dd1d1d32d4ce3e8582bd715b Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 21 Sep 2022 22:25:04 +0200 Subject: [PATCH] ceph-volume: fix regression in activate bea9f4b643c introduced a regression that makes the activate process take a very long time to complete. `_get_bluestore_info()` which calls `ceph-bluestore-tool` binary via subprocess is called in an exponential way while this is not needed. Fixes: https://tracker.ceph.com/issues/57627 Signed-off-by: Guillaume Abrioux (cherry picked from commit 8d7423c3e75afbe111c91e699ef3cb1c0beee61b) --- .../ceph_volume/devices/raw/list.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ceph-volume/ceph_volume/devices/raw/list.py b/src/ceph-volume/ceph_volume/devices/raw/list.py index 06a2b3c224087..a9eb413120df4 100644 --- a/src/ceph-volume/ceph_volume/devices/raw/list.py +++ b/src/ceph-volume/ceph_volume/devices/raw/list.py @@ -101,16 +101,16 @@ class List(object): 'failed to determine if parent device {} is BlueStore. err: {}'.format(parent, e))) continue - bs_info = _get_bluestore_info(dev) - if bs_info is None: - # None is also returned in the rare event that there is an issue reading info from - # a BlueStore disk, so be sure to log our assumption that it isn't bluestore - logger.info('device {} does not have BlueStore information'.format(dev)) - continue - uuid = bs_info['osd_uuid'] - if uuid not in result: - result[uuid] = {} - result[uuid].update(bs_info) + bs_info = _get_bluestore_info(dev) + if bs_info is None: + # None is also returned in the rare event that there is an issue reading info from + # a BlueStore disk, so be sure to log our assumption that it isn't bluestore + logger.info('device {} does not have BlueStore information'.format(dev)) + continue + uuid = bs_info['osd_uuid'] + if uuid not in result: + result[uuid] = {} + result[uuid].update(bs_info) return result -- 2.39.5