]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: additional logging for SMART data retrieval 37637/head
authorPatrick Seidensal <pseidensal@suse.com>
Mon, 12 Oct 2020 14:37:59 +0000 (16:37 +0200)
committerPatrick Seidensal <pseidensal@suse.com>
Thu, 22 Oct 2020 15:05:29 +0000 (17:05 +0200)
Fixes: https://tracker.ceph.com/issues/47834
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
src/pybind/mgr/dashboard/controllers/osd.py
src/pybind/mgr/dashboard/services/ceph_service.py

index 91d1126fa4064c18ac4d3e11feb656d811ba857a..304b689382de66da1d4e846b18dacae6f2cd52b6 100644 (file)
@@ -98,6 +98,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 a045faee60fe0242a8324938f03d8e2cfcd907d0..42d511c1b500203c0ce2f89462fd3bc55580d99e 100644 (file)
@@ -12,7 +12,7 @@ from .. import mgr
 from ..exceptions import DashboardException
 
 try:
-    from typing import Any, Dict, Union, Optional
+    from typing import Any, Dict, Optional, Union
 except ImportError:
     pass  # For typing only
 
@@ -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