]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/telemetry: catch also IndexError in gather_device_report() 44327/head
authorYaarit Hatuka <yaarit@redhat.com>
Wed, 15 Dec 2021 22:45:57 +0000 (22:45 +0000)
committerYaarit Hatuka <yaarit@redhat.com>
Thu, 16 Dec 2021 02:27:24 +0000 (02:27 +0000)
commit6618104ac314b691402161dc5eab9327232a69b2
tree2c41df2171f3f928a3e6a69e6d67a542903b1835
parent6a1e2cb4b217a41f64b4b1126aff68380a594f9e
mgr/telemetry: catch also IndexError in gather_device_report()

When generating the device report, we obfuscate host names, which
exist in a device's 'location' key. Some devices do not have a
'location' key, thus we catch a KeyError in these cases; in other cases
the key exists, but its value is an empty list. Skip these too by
catching an IndexError.

Fixes: https://tracker.ceph.com/issues/53603
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
src/pybind/mgr/telemetry/module.py