Project

General

Profile

Actions

Bug #41525

closed

mgr/dashboard: Missing service metadata is not handled correctly

Added by Volker Theile over 4 years ago. Updated about 3 years ago.

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

0%

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

Description

The Dashboard REST API throws a Python error when fetching metadata for service mds.X fails. Instead of a Python error an exception should be thrown.

2019-08-27T08:14:23.158+0000 7f5f19032700 -1 mgr get_metadata_python Requested missing service mds.a
2019-08-27T08:14:23.162+0000 7f5f19032700  0 mgr[dashboard] [27/Aug/2019:08:14:23] HTTP 
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/cherrypy/_cprequest.py", line 628, in respond
    self._do_respond(path_info)
  File "/usr/lib/python3.7/site-packages/cherrypy/_cprequest.py", line 687, in _do_respond
    response.body = self.handler()
  File "/usr/lib/python3.7/site-packages/cherrypy/lib/encoding.py", line 219, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/cherrypy/_cptools.py", line 230, in wrap
    return self.newhandler(innerfunc, *args, **kwargs)
  File "/ceph/src/pybind/mgr/dashboard/services/exception.py", line 88, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/ceph/src/pybind/mgr/dashboard/controllers/__init__.py", line 645, in inner
    ret = func(*args, **kwargs)
  File "/ceph/src/pybind/mgr/dashboard/controllers/__init__.py", line 838, in wrapper
    return func(*vpath, **params)
  File "/ceph/src/pybind/mgr/dashboard/controllers/cephfs.py", line 32, in get
    return self.fs_status(fs_id)
  File "/ceph/src/pybind/mgr/dashboard/controllers/cephfs.py", line 179, in fs_status
    mds_versions[metadata.get('ceph_version', 'unknown')].append(
AttributeError: 'NoneType' object has no attribute 'get'


Related issues 7 (0 open7 closed)

Related to CephFS - Bug #41538: mds: wrong compat can cause MDS to be added daemon registry on mgr but not the fsmapResolvedPatrick Donnelly

Actions
Related to mgr - Bug #23967: ceph fs status and Dashboard fail with Python stack traceDuplicate05/02/2018

Actions
Related to CephFS - Bug #42494: ceph: config show can't locate mdsResolvedSage Weil

Actions
Related to CephFS - Bug #36370: add information about active scrubs to "ceph -s" (and elsewhere)ResolvedVenky Shankar

Actions
Has duplicate mgr - Bug #41674: tasks.mgr.dashboard.test_cephfs.CephfsTest fails, metadata is NoneDuplicate09/05/2019

Actions
Has duplicate Dashboard - Bug #41798: mgr/dashboard: Error 500 when clicking the MDS host on the Filesystems page (Raising "AttributeError: 'NoneType' object has no attribute 'get'")Duplicate

Actions
Copied to Dashboard - Backport #42569: nautilus: mgr/dashboard: Missing service metadata is not handled correctlyResolvedVenky ShankarActions
Actions

Also available in: Atom PDF