Project

General

Profile

Actions

Cleanup #58973

open

mgr/dashboard: RGW 404 shouldn't trigger log exceptions

Added by Ernesto Puerta about 1 year ago. Updated 23 days ago.

Status:
Fix Under Review
Priority:
Normal
Category:
General - Back-end
Target version:
% Done:

0%

Tags:
test-failure
Backport:
reef, quincy, squid
Reviewed:
Affected Versions:
Pull request ID:

Description

A log like this is impossible to debug since expected situations (like 404s in RGW buckets) trigger Python Exceptions. Example

Instead they should just print regular log traces. By fixing this, it should be easier for everyone to debug Jenkins job failures.

2023-03-13T10:59:30.960+0000 7fdbd4eb8640  0 [dashboard DEBUG urllib3.connectionpool] http://adami08.front.sepia.ceph.com:8001 "GET /admin/user?stats&uid=e2e_&stats=True HTTP/1.1" 404 115
2023-03-13T10:59:30.964+0000 7fdbd4eb8640  0 [dashboard ERROR rest_client] RGW REST API failed GET req status: 404
2023-03-13T10:59:30.964+0000 7fdbd4eb8640  0 [dashboard ERROR exception] Dashboard Exception
Traceback (most recent call last):
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/controllers/rgw.py", line 162, in proxy
    result = instance.proxy(method, path, params, None)
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/services/rgw_client.py", line 514, in proxy
    return self._proxy_request(self.admin_path, path, method,
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/rest_client.py", line 537, in func_wrapper
    return func(
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/services/rgw_client.py", line 508, in _proxy_request
    return request(method=method, params=params, data=data,
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/rest_client.py", line 324, in __call__
    resp = self.rest_client.do_request(method, self._gen_path(), params,
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/rest_client.py", line 422, in do_request
    raise RequestException(
dashboard.rest_client.RequestException: RGW REST API failed request with status code 404
(b'{"Code":"NoSuchUser","RequestId":"tx000004aafa01375af9357-00640f0212-116f-de'
 b'fault","HostId":"116f-default-default"}')

During handling of the above exception, another exception occurred:

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 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/controllers/_base_controller.py", line 263, in inner
    ret = func(*args, **kwargs)
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/controllers/_rest_controller.py", line 190, in wrapper
    return func(*vpath, **params)
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/controllers/rgw.py", line 462, in get
    result = self.proxy(daemon_name, 'GET', 'user{}'.format(query_params),
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/controllers/rgw.py", line 168, in proxy
    raise DashboardException(e, http_status_code=http_status_code, component='rgw')
dashboard.exceptions.DashboardException: RGW REST API failed request with status code 404
(b'{"Code":"NoSuchUser","RequestId":"tx000004aafa01375af9357-00640f0212-116f-de'
 b'fault","HostId":"116f-default-default"}')
Actions #1

Updated by Ernesto Puerta about 1 year ago

  • Tracker changed from Bug to Cleanup
  • Category set to General - Back-end
Actions #2

Updated by Ernesto Puerta about 1 year ago

  • Status changed from New to Fix Under Review
  • Assignee set to Ernesto Puerta
  • Pull request ID set to 50612
Actions #3

Updated by Konstantin Shalygin 23 days ago

  • Backport changed from reef, quincy, pacific to reef, quincy, squid
Actions

Also available in: Atom PDF