Project

General

Profile

Actions

Bug #57480

closed

mgr/telemetry: log exceptions as "exception" instead of "error"

Added by Laura Flores over 1 year ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
telemetry module
Target version:
-
% Done:

100%

Source:
Tags:
low-hanging-fruit backport_processed
Backport:
quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

See relevant code and fixes here:

https://github.com/ceph/ceph/blob/f4bb197f3e16c40b741945a0a40f8bd707661e73/src/pybind/mgr/telemetry/module.py#L596-L598

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

https://github.com/ceph/ceph/blob/f4bb197f3e16c40b741945a0a40f8bd707661e73/src/pybind/mgr/telemetry/module.py#L713-L715

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

https://github.com/ceph/ceph/blob/f4bb197f3e16c40b741945a0a40f8bd707661e73/src/pybind/mgr/telemetry/module.py#L928-L930

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


Related issues 1 (0 open1 closed)

Copied to mgr - Backport #59565: quincy: mgr/telemetry: log exceptions as "exception" instead of "error"ResolvedKonstantin ShalyginActions
Actions #1

Updated by Laura Flores over 1 year ago

  • Assignee deleted (Yaarit Hatuka)
Actions #2

Updated by Yaarit Hatuka over 1 year ago

  • Backport set to quincy
Actions #3

Updated by Laura Flores over 1 year ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 48152
Actions #5

Updated by Laura Flores over 1 year ago

  • Status changed from Fix Under Review to Resolved
Actions #6

Updated by Konstantin Shalygin almost 1 year ago

  • Status changed from Resolved to Pending Backport
Actions #7

Updated by Backport Bot almost 1 year ago

  • Copied to Backport #59565: quincy: mgr/telemetry: log exceptions as "exception" instead of "error" added
Actions #8

Updated by Backport Bot almost 1 year ago

  • Tags changed from low-hanging-fruit to low-hanging-fruit backport_processed
Actions #9

Updated by Laura Flores 10 months ago

  • Translation missing: en.field_tag_list changed from low-hanging-fruit to low-hanging-fruit, open-source-day
Actions #10

Updated by Konstantin Shalygin 10 months ago

  • Status changed from Pending Backport to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF