From: Pedro Gonzalez Gomez Date: Wed, 17 Jun 2026 11:33:45 +0000 (+0200) Subject: mgr/dashboard: fix hardware KeyError X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2Ffix-hw-keyerror;p=ceph.git mgr/dashboard: fix hardware KeyError Fixes: https://tracker.ceph.com/issues/77465 Signed-off-by: Pedro Gonzalez Gomez --- diff --git a/src/pybind/mgr/dashboard/services/hardware.py b/src/pybind/mgr/dashboard/services/hardware.py index 31054ab4cc7..f6636c19619 100644 --- a/src/pybind/mgr/dashboard/services/hardware.py +++ b/src/pybind/mgr/dashboard/services/hardware.py @@ -53,7 +53,8 @@ class HardwareService(object): output['host'].setdefault(host, {'flawed': False}) if not output['host'][host]['flawed']: for system in systems.values(): - if any(dimm['status']['health'] != 'OK' for dimm in system.values()): + if any(dimm.get('status', {}).get('health') != 'OK' + for dimm in system.values()): output['host'][host]['flawed'] = True break