Skip to content

Commit

Permalink
mgr/prometheus: get osd_objectstore once instead twice.
Browse files Browse the repository at this point in the history
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 <k0ste@k0ste.ru>
(cherry picked from commit bf3231b)
  • Loading branch information
k0ste committed Feb 27, 2019
1 parent e0fad50 commit 1818f50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pybind/mgr/prometheus/module.py
Expand Up @@ -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
Expand Down

0 comments on commit 1818f50

Please sign in to comment.