From: Vonesha Frost Date: Fri, 16 Sep 2022 20:38:37 +0000 (-0500) Subject: mgr/telemetry: fixed log exceptions as "exception" instead of "error" X-Git-Tag: v17.2.7~281^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e84b2b198e18ee06e76f226734cd19de9d286747;p=ceph.git mgr/telemetry: fixed log exceptions as "exception" instead of "error" Fixes: https://tracker.ceph.com/issues/57480 Signed-off-by: Vonesha Frost (cherry picked from commit 7bc79dbb7b5f256a502202d346af87b7313f0c14) --- diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 293daa22a082..e4f637def9e4 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -601,7 +601,7 @@ class Module(MgrModule): else: self.log.error("Incorrect mode specified in get_mempool: {}".format(mode)) except (json.decoder.JSONDecodeError, KeyError) as e: - self.log.error("Error caught on {}.{}: {}".format(daemon_type, daemon_id, e)) + self.log.exception("Error caught on {}.{}: {}".format(daemon_type, daemon_id, e)) continue if anonymized_daemons: @@ -718,7 +718,7 @@ class Module(MgrModule): # schema when it doesn't. In either case, we'll handle that # by continuing and collecting what we can from other osds. except (json.decoder.JSONDecodeError, KeyError) as e: - self.log.error("Error caught on osd.{}: {}".format(osd_id, e)) + self.log.exception("Error caught on osd.{}: {}".format(osd_id, e)) continue return list(result.values()) @@ -933,7 +933,7 @@ class Module(MgrModule): try: host = d['location'][0]['host'] except (KeyError, IndexError) as e: - self.log.error('Unable to get host from device with id "{}": {}'.format(devid, e)) + self.log.exception('Unable to get host from device with id "{}": {}'.format(devid, e)) continue anon_host = self.get_store('host-id/%s' % host) if not anon_host: