From: Lenz Grimmer Date: Thu, 27 Feb 2020 08:23:17 +0000 (+0000) Subject: Merge pull request #32953 from votdev/issue_43665_smart_data X-Git-Tag: v15.1.1~233 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=66ea64441890a058138a9572683f7d5df5cb0443;p=ceph-ci.git Merge pull request #32953 from votdev/issue_43665_smart_data mgr/dashboard: smart: smart data read out on down osd causes error popup Reviewed-by: Laura Paduano Reviewed-by: Patrick Seidensal Reviewed-by: Stephan Müller --- 66ea64441890a058138a9572683f7d5df5cb0443 diff --cc src/pybind/mgr/dashboard/services/ceph_service.py index 6c83dcc7557,f9d2738ff0d..f015c92f1ca --- a/src/pybind/mgr/dashboard/services/ceph_service.py +++ b/src/pybind/mgr/dashboard/services/ceph_service.py @@@ -9,9 -9,10 +9,10 @@@ from mgr_module import CommandResul from mgr_util import get_time_series_rates, get_most_recent_rate from .. import mgr + from ..exceptions import DashboardException try: - from typing import Dict, Any # pylint: disable=unused-import + from typing import Dict # pylint: disable=unused-import except ImportError: pass # For typing only @@@ -191,8 -230,16 +230,16 @@@ class CephService(object) @staticmethod def get_smart_data_by_host(hostname): # type: (str) -> dict + """ + Get the SMART data of all devices on the given host, regardless + of the daemon (osd, mon, ...). + :param hostname: The name of the host. + :return: A dictionary containing the SMART data of every device + on the given host. The device name is used as the key in the + dictionary. + """ devices = CephService.get_devices_by_host(hostname) - smart_data = {} + smart_data = {} # type: dict if devices: for device in devices: if device['devid'] not in smart_data: