From 1818f50f1eaf2ada4c8df46ba6593d8bd8a39b9b Mon Sep 17 00:00:00 2001 From: Konstantin Shalygin Date: Thu, 21 Feb 2019 14:22:21 +0700 Subject: [PATCH] mgr/prometheus: get osd_objectstore once instead twice. After merging #25234 & #24821 separetly we get in get_metadata_and_osd_status() double osd_metadata.get('osd_objectstore') call. Signed-off-by: Konstantin Shalygin (cherry picked from commit bf3231ba17c7eaada8a24e8cd8a57b8ec6216dc4) --- src/pybind/mgr/prometheus/module.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index c23503f3ba7b5..bf6548fb9936d 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -498,14 +498,13 @@ def get_metadata_and_osd_status(self): 'osd.{}'.format(id_), )) - osd_objectstore = osd_metadata.get('osd_objectstore', None) - if osd_objectstore == "filestore": + if obj_store == "filestore": # collect filestore backend device osd_dev_node = osd_metadata.get('backend_filestore_dev_node', None) # collect filestore journal device osd_wal_dev_node = osd_metadata.get('osd_journal', '') osd_db_dev_node = '' - elif osd_objectstore == "bluestore": + elif obj_store == "bluestore": # collect bluestore backend device osd_dev_node = osd_metadata.get('bluestore_bdev_dev_node', None) # collect bluestore wal backend