Project

General

Profile

Actions

Cleanup #54991

closed

mgr/dashboard: don't log HTTP 3xx as errors

Added by Ernesto Puerta about 2 years ago. Updated almost 2 years ago.

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

0%

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

Description

The static assets (everything under the Home controller or build/dist) don't need to be served always from disk. The browser can be hinted to use the cached items if they haven't changed:

2022-03-22T11:06:34.968+0000 7ff977cdf700  0 [dashboard DEBUG controllers.home] frontend language from headers: ['en-us']
2022-03-22T11:06:34.968+0000 7ff977cdf700  0 [dashboard DEBUG controllers.home] found directory for language 'en-us'
2022-03-22T11:06:34.968+0000 7ff977cdf700  0 [dashboard DEBUG controllers.home] serving static content: /home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/build/src/pybind/mgr/dashboard/frontend/dist/en-US/styles.css
2022-03-22T11:06:34.968+0000 7ff977cdf700  0 [dashboard ERROR exception] Internal Server Error
Traceback (most recent call last):
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/services/exception.py", line 47, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/controllers/home.py", line 134, in __call__
    return serve_file(full_path)
  File "/usr/lib/python3/dist-packages/cherrypy/lib/static.py", line 70, in serve_file
    cptools.validate_since()
  File "/usr/lib/python3/dist-packages/cherrypy/lib/cptools.py", line 117, in validate_since
    raise cherrypy.HTTPRedirect([], 304)
cherrypy._cperror.HTTPRedirect: ([], 304)

We should avoid polluting logs with these "errors".


Related issues 2 (0 open2 closed)

Copied to Dashboard - Backport #55115: quincy: mgr/dashboard: don't log HTTP 3xx as errorsResolvedErnesto PuertaActions
Copied to Dashboard - Backport #55116: pacific: mgr/dashboard: don't log HTTP 3xx as errorsResolvedErnesto PuertaActions
Actions #1

Updated by Ernesto Puerta about 2 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 45563
Actions #2

Updated by Ernesto Puerta about 2 years ago

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

Updated by Backport Bot about 2 years ago

  • Copied to Backport #55115: quincy: mgr/dashboard: don't log HTTP 3xx as errors added
Actions #4

Updated by Backport Bot about 2 years ago

  • Copied to Backport #55116: pacific: mgr/dashboard: don't log HTTP 3xx as errors added
Actions #5

Updated by Ernesto Puerta almost 2 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF