Project

General

Profile

Bug #41779

mgr/dashboard: Error during iSCSI target edition

Added by Ricardo Marques 8 days ago. Updated 8 days ago.

Status:
Need Review
Priority:
Normal
Category:
dashboard/iscsi
Target version:
Start date:
09/11/2019
Due date:
% Done:

0%

Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

During the edition of an iSCSI target, I got the following error on dashboard:

2019-09-11 13:12:52.063 7f48b81a7700  0 mgr[dashboard] [b'{"status": "500 Internal Server Error", "detail": "The server encountered an unexpected condition which prevented it from fulfilling the request.", "traceback": "Traceback (most re
cent call last):\\n  File \\"/usr/lib/python3.7/site-packages/cherrypy/_cprequest.py\\", line 628, in respond\\n    self._do_respond(path_info)\\n  File \\"/usr/lib/python3.7/site-packages/cherrypy/_cprequest.py\\", line 687, in _do_respo
nd\\n    response.body = self.handler()\\n  File \\"/usr/lib/python3.7/site-packages/cherrypy/lib/encoding.py\\", line 219, in __call__\\n    self.body = self.oldhandler(*args, **kwargs)\\n  File \\"/usr/lib/python3.7/site-packages/cherry
py/_cptools.py\\", line 230, in wrap\\n    return self.newhandler(innerfunc, *args, **kwargs)\\n  File \\"/ceph/src/pybind/mgr/dashboard/services/exception.py\\", line 88, in dashboard_exception_handler\\n    return handler(*args, **kwarg
s)\\n  File \\"/usr/lib/python3.7/site-packages/cherrypy/_cpdispatch.py\\", line 54, in __call__\\n    return self.callable(*self.args, **self.kwargs)\\n  File \\"/ceph/src/pybind/mgr/dashboard/controllers/__init__.py\\", line 645, in inn
er\\n    ret = func(*args, **kwargs)\\n  File \\"/ceph/src/pybind/mgr/dashboard/controllers/__init__.py\\", line 838, in wrapper\\n    return func(*vpath, **params)\\n  File \\"/ceph/src/pybind/mgr/dashboard/controllers/iscsi.py\\", line 
198, in list\\n    IscsiTarget._set_info(target)\\n  File \\"/ceph/src/pybind/mgr/dashboard/controllers/iscsi.py\\", line 772, in _set_info\\n    target_iqn, client_iqn)\\n  File \\"/ceph/src/pybind/mgr/dashboard/rest_client.py\\", line 5
06, in func_wrapper\\n    **kwargs)\\n  File \\"/ceph/src/pybind/mgr/dashboard/services/iscsi_client.py\\", line 237, in get_clientinfo\\n    return request()\\n  File \\"/ceph/src/pybind/mgr/dashboard/rest_client.py\\", line 313, in __ca
ll__\\n    data, raw_content)\\n  File \\"/ceph/src/pybind/mgr/dashboard/rest_client.py\\", line 432, in do_request\\n    resp.content)\\ndashboard.rest_client.RequestException: iscsi REST API failed request with status code 400\\n(b\'{\\
"message\\":\\"failed on node2.ceph.local. Client iqn.2001-07.com.ceph:15681109\'\\n b\'69485-c1 does not exist\\"}\\\\n\')\\n", "version": "18.1.1"}']

This happened because the client/initiator was being recreated and does not exist at the moment dashboard called the `/clientinfo` endpoint.

To fix this, `ceph-iscsi` should return a 404 error instead of a 400 when the client does not exist, and Ceph Dashboard should handle the 404 error gracefully.

History

#1 Updated by Ricardo Marques 8 days ago

  • Status changed from In Progress to Need Review
  • Pull request ID set to 30349

Also available in: Atom PDF