]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: additional logging for SMART data retrieval
authorPatrick Seidensal <pseidensal@suse.com>
Mon, 12 Oct 2020 14:37:59 +0000 (16:37 +0200)
committerLaura Paduano <lpaduano@suse.com>
Wed, 3 Feb 2021 14:39:45 +0000 (15:39 +0100)
Fixes: https://tracker.ceph.com/issues/47834
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
(cherry picked from commit 864656a074a1f08cef762541dc19b7aba867587a)

src/pybind/mgr/dashboard/controllers/osd.py
src/pybind/mgr/dashboard/services/ceph_service.py

index 8a2db1434f9c07578d91a41c5e67d72caaaa3497..accccd7703b47d2f317a3d86d5ccd5c57653ee12 100644 (file)
@@ -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')
index 28a3b18a1111bfd44354259865e766fe3aaf8313..ea918b6b3f953683437d95622811d87c0df2f338 100644 (file)
@@ -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