From 53eb841a0a367c5e2d48dc0ad9a83f38b562bbd8 Mon Sep 17 00:00:00 2001 From: Patrick Seidensal Date: Mon, 12 Oct 2020 16:37:59 +0200 Subject: [PATCH] mgr/dashboard: additional logging for SMART data retrieval Fixes: https://tracker.ceph.com/issues/47834 Signed-off-by: Patrick Seidensal (cherry picked from commit 864656a074a1f08cef762541dc19b7aba867587a) --- src/pybind/mgr/dashboard/controllers/osd.py | 1 + src/pybind/mgr/dashboard/services/ceph_service.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/pybind/mgr/dashboard/controllers/osd.py b/src/pybind/mgr/dashboard/controllers/osd.py index 8a2db1434f9..accccd7703b 100644 --- a/src/pybind/mgr/dashboard/controllers/osd.py +++ b/src/pybind/mgr/dashboard/controllers/osd.py @@ -87,6 +87,7 @@ class Osd(RESTController): def _get_smart_data(osd_id): # type: (str) -> dict """Returns S.M.A.R.T data for the given OSD ID.""" + logger.debug('[SMART] retrieving data from OSD with ID %s', osd_id) return CephService.get_smart_data_by_daemon('osd', osd_id) @RESTController.Resource('GET') diff --git a/src/pybind/mgr/dashboard/services/ceph_service.py b/src/pybind/mgr/dashboard/services/ceph_service.py index 28a3b18a111..ea918b6b3f9 100644 --- a/src/pybind/mgr/dashboard/services/ceph_service.py +++ b/src/pybind/mgr/dashboard/services/ceph_service.py @@ -279,6 +279,8 @@ class CephService(object): if device['devid'] not in smart_data: smart_data.update( CephService._get_smart_data_by_device(device)) + else: + logger.debug('[SMART] could not retrieve device list from host %s', hostname) return smart_data @staticmethod @@ -299,6 +301,10 @@ class CephService(object): if device['devid'] not in smart_data: smart_data.update( CephService._get_smart_data_by_device(device)) + else: + msg = '[SMART] could not retrieve device list from daemon with type %s and ' +\ + 'with ID %d' + logger.debug(msg, daemon_type, daemon_id) return smart_data @classmethod -- 2.47.3