Project

General

Profile

Actions

Bug #41779

closed

mgr/dashboard: Error during iSCSI target edition

Added by Ricardo Marques over 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Ricardo Marques
Category:
Component - iSCSI
Target version:
% Done:

0%

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

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.


Related issues 1 (0 open1 closed)

Copied to Dashboard - Backport #42030: nautilus: mgr/dashboard: Error during iSCSI target editionResolvedRicardo MarquesActions
Actions #1

Updated by Ricardo Marques over 4 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 30349
Actions #2

Updated by Lenz Grimmer over 4 years ago

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

Updated by Ricardo Marques over 4 years ago

  • Copied to Backport #42030: nautilus: mgr/dashboard: Error during iSCSI target edition added
Actions #4

Updated by Lenz Grimmer over 4 years ago

  • Status changed from Pending Backport to Resolved
Actions #5

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 141 to Component - iSCSI
Actions

Also available in: Atom PDF