Project

General

Profile

Actions

Cleanup #55720

open

mgr/dashboard: improve error reporting in logs

Added by Ernesto Puerta almost 2 years ago. Updated over 1 year ago.

Status:
Pending Backport
Priority:
Normal
Category:
General - Back-end
Target version:
-
% Done:

0%

Tags:
backport_processed
Backport:
pacific quincy
Reviewed:
Affected Versions:
Pull request ID:

Description

Dashboard reports regular (expected) errors in a very dramatic way. The following is a 404, something that should look usual in a webserver event log:

41> 2022-05-13T17:03:23.586+0000 7f3069c9b700  0 [dashboard ERROR exception] Internal Server Error
Traceback (most recent call last):
  File "/lib/python3.6/site-packages/cherrypy/lib/static.py", line 58, in serve_file
    st = os.stat(path)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/ceph/mgr/dashboard/frontend/dist/en-US/prometheus_receiver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 47, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/share/ceph/mgr/dashboard/controllers/home.py", line 134, in __call__
    return serve_file(full_path)
  File "/lib/python3.6/site-packages/cherrypy/lib/static.py", line 65, in serve_file
    raise cherrypy.NotFound()
cherrypy._cperror.NotFound: (404, "The path '/prometheus_receiver' was not found.")

However it looks like the whole server crashed (well, in this very case, it crashed but for a different reason).

We should just expect a trace like (which in fact is already printed):

2022-05-13T17:03:23.590+0000 7f3069c9b700 0 [dashboard INFO request] [::ffff:172.21.2.202:34646] [POST] [404] [0.006s] [513.0B] [43c44f60-2cf5-4611-90b8-09681c4bbce3] /prometheus_receiver

So this activity should be more about capturing exceptions and muting them (the event log trace is enough). That includes 4xx, 3xx, and similar errors.


Related issues 2 (1 open1 closed)

Copied to Dashboard - Backport #56546: pacific: mgr/dashboard: improve error reporting in logsResolvedErnesto PuertaActions
Copied to Dashboard - Backport #56547: quincy: mgr/dashboard: improve error reporting in logsIn ProgressErnesto PuertaActions
Actions #1

Updated by Ernesto Puerta almost 2 years ago

  • Status changed from New to Fix Under Review
  • Backport set to pacific quincy
  • Pull request ID set to 46898
Actions #2

Updated by Pere Díaz Bou almost 2 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Backport Bot almost 2 years ago

  • Copied to Backport #56546: pacific: mgr/dashboard: improve error reporting in logs added
Actions #4

Updated by Backport Bot almost 2 years ago

  • Copied to Backport #56547: quincy: mgr/dashboard: improve error reporting in logs added
Actions #5

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF