]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: fixed log exceptions as "exception" instead of "error" 51244/head
authorVonesha Frost <voneshafrost@gmail.com>
Fri, 16 Sep 2022 20:38:37 +0000 (15:38 -0500)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Thu, 27 Apr 2023 08:46:48 +0000 (15:46 +0700)
Fixes: https://tracker.ceph.com/issues/57480
Signed-off-by: Vonesha Frost <voneshafrost08@gmail.com>
(cherry picked from commit 7bc79dbb7b5f256a502202d346af87b7313f0c14)

src/pybind/mgr/telemetry/module.py

index 293daa22a0828fead49e19721369141a3c3842fb..e4f637def9e4ee32f6ed3e10b2bce4f0f4c6de38 100644 (file)
@@ -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: