Project

General

Profile

Bug #25190

mgr/dashboard: RestClient can't handle ProtocolError exceptions

Added by Volker Theile over 5 years ago. Updated almost 3 years ago.

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

0%

Source:
Development
Tags:
Backport:
mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The problem seems to be here: https://github.com/ceph/ceph/blob/master/src/pybind/mgr/dashboard/rest_client.py#L430

If a ConnectionError exception is catched which was thrown by this code https://github.com/requests/requests/blob/master/requests/adapters.py#L495 the processing of the args is faulty. Seems that this error never occured during the implementation of the RestClient.

2018-07-30T13:16:31.706 INFO:tasks.cephfs_test_runner:test_list (tasks.mgr.dashboard.test_rgw.RgwUserTest) ... FAIL
2018-07-30T13:16:31.706 INFO:teuthology.orchestra.run.smithi099:Running: "sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph log 'Ended test tasks.mgr.dashboard.test_rgw.RgwUserTest.test_list'" 
2018-07-30T13:16:31.707 INFO:tasks.ceph.mgr.x.smithi099.stderr:[30/Jul/2018:13:16:31] HTTP Traceback (most recent call last):
2018-07-30T13:16:31.707 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
2018-07-30T13:16:31.707 INFO:tasks.ceph.mgr.x.smithi099.stderr:    response.body = self.handler()
2018-07-30T13:16:31.707 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in __call__
2018-07-30T13:16:31.707 INFO:tasks.ceph.mgr.x.smithi099.stderr:    self.body = self.oldhandler(*args, **kwargs)
2018-07-30T13:16:31.707 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib/python2.7/site-packages/cherrypy/_cptools.py", line 221, in wrap
2018-07-30T13:16:31.707 INFO:tasks.ceph.mgr.x.smithi099.stderr:    return self.newhandler(innerfunc, *args, **kwargs)
2018-07-30T13:16:31.708 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/services/exception.py", line 88, in dashboard_exception_handler
2018-07-30T13:16:31.708 INFO:tasks.ceph.mgr.x.smithi099.stderr:    return handler(*args, **kwargs)
2018-07-30T13:16:31.708 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in __call__
2018-07-30T13:16:31.708 INFO:tasks.ceph.mgr.x.smithi099.stderr:    return self.callable(*self.args, **self.kwargs)
2018-07-30T13:16:31.708 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/controllers/__init__.py", line 537, in inner
2018-07-30T13:16:31.709 INFO:tasks.ceph.mgr.x.smithi099.stderr:    ret = func(*args, **kwargs)
2018-07-30T13:16:31.709 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/controllers/__init__.py", line 717, in wrapper
2018-07-30T13:16:31.709 INFO:tasks.ceph.mgr.x.smithi099.stderr:    return func(*vpath, **params)
2018-07-30T13:16:31.709 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/controllers/rgw.py", line 139, in list
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:    return self.proxy('GET', 'metadata/user')
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/controllers/rgw.py", line 97, in proxy
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:    result = instance.proxy(method, path, params, None)
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/services/rgw_client.py", line 263, in proxy
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:    return self._proxy_request(self.admin_path, path, method, params, data)
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/rest_client.py", line 503, in func_wrapper
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:    **kwargs)
2018-07-30T13:16:31.710 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/services/rgw_client.py", line 258, in _proxy_request
2018-07-30T13:16:31.711 INFO:tasks.ceph.mgr.x.smithi099.stderr:    method=method, params=params, data=data, raw_content=True)
2018-07-30T13:16:31.711 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/rest_client.py", line 313, in __call__
2018-07-30T13:16:31.711 INFO:tasks.ceph.mgr.x.smithi099.stderr:    data, raw_content)
2018-07-30T13:16:31.711 INFO:tasks.ceph.mgr.x.smithi099.stderr:  File "/usr/lib64/ceph/mgr/dashboard/rest_client.py", line 443, in do_request
2018-07-30T13:16:31.711 INFO:tasks.ceph.mgr.x.smithi099.stderr:    ex.args[0].reason.args[0])
2018-07-30T13:16:31.711 INFO:tasks.ceph.mgr.x.smithi099.stderr:AttributeError: 'ProtocolError' object has no attribute 'reason'

Related issues

Related to Dashboard - Bug #35834: mgr/dashboard: Frontend timeouts when RGW takes too long to respond Resolved
Copied to Dashboard - Backport #35079: mimic: mgr/dashboard: RestClient can't handle ProtocolError exceptions Resolved

History

#1 Updated by Volker Theile over 5 years ago

  • Assignee set to Volker Theile

#2 Updated by Volker Theile over 5 years ago

  • Affected Versions v13.2.2 added

#3 Updated by Volker Theile over 5 years ago

#4 Updated by Volker Theile over 5 years ago

  • Status changed from New to Fix Under Review

#5 Updated by Lenz Grimmer over 5 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to mimic

#6 Updated by Nathan Cutler over 5 years ago

  • Copied to Backport #35079: mimic: mgr/dashboard: RestClient can't handle ProtocolError exceptions added

#7 Updated by Nathan Cutler over 5 years ago

  • Related to Bug #35834: mgr/dashboard: Frontend timeouts when RGW takes too long to respond added

#8 Updated by Nathan Cutler over 5 years ago

  • Status changed from Pending Backport to Resolved

#9 Updated by Ernesto Puerta almost 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 146 to General - Back-end

Also available in: Atom PDF