]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix hardware KeyError fix-hw-keyerror 69546/head
authorPedro Gonzalez Gomez <pegonzal@ibm.com>
Wed, 17 Jun 2026 11:33:45 +0000 (13:33 +0200)
committerPedro Gonzalez Gomez <pegonzal@ibm.com>
Wed, 17 Jun 2026 11:33:45 +0000 (13:33 +0200)
Fixes: https://tracker.ceph.com/issues/77465
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@ibm.com>
src/pybind/mgr/dashboard/services/hardware.py

index 31054ab4cc7af4a125e9e5b7e7359910c5fdeb36..f6636c196191c6e30f188541793ddbdbd6611f08 100644 (file)
@@ -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