Project

General

Profile

Actions

Bug #50205

open

Telemetry module failing on empty JSON

Added by Michał Chybowski about 3 years ago. Updated almost 3 years ago.


Description

Ubuntu 16.04, 18.04

Ceph 14.2.11+

Telemetry module is not validating JSON while trying to anonymize hard drives serail numbers:

2021-04-06 10:05:47.671 7f783a83c700 -1 log_channel(cluster) log [ERR] : Unhandled exception from module 'telemetry' while running on mgr.rgw3: No JSON object could be decoded
2021-04-06 10:05:47.671 7f783a83c700 -1 telemetry.serve:
2021-04-06 10:05:47.671 7f783a83c700 -1 Traceback (most recent call last):
  File "/usr/share/ceph/mgr/telemetry/module.py", line 832, in serve
    self.send(self.last_report)
  File "/usr/share/ceph/mgr/telemetry/module.py", line 716, in send
    devices = self.gather_device_report()
  File "/usr/share/ceph/mgr/telemetry/module.py", line 414, in gather_device_report
    m = json.loads(m_str.replace(serial, 'deleted'))
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Actions

Also available in: Atom PDF