Project

General

Profile

Cleanup #54991

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

Added by Ernesto Puerta 9 months ago. Updated 6 months 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

Copied to Dashboard - Backport #55115: quincy: mgr/dashboard: don't log HTTP 3xx as errors Resolved
Copied to Dashboard - Backport #55116: pacific: mgr/dashboard: don't log HTTP 3xx as errors Resolved

History

#1 Updated by Ernesto Puerta 9 months ago

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

#2 Updated by Ernesto Puerta 8 months ago

  • Status changed from Fix Under Review to Pending Backport

#3 Updated by Backport Bot 8 months ago

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

#4 Updated by Backport Bot 8 months ago

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

#5 Updated by Ernesto Puerta 6 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF