Project

General

Profile

Actions

Bug #55182

open

mgr/dashboard: inventory and service endpoints are invoked when cephadm is not the orchestrator

Added by Ernesto Puerta about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Component - Services & Daemons
Target version:
-
% Done:

0%

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

Description

Description of problem

A user accessing Cluster > Physical Disks, or Cluster > Services pages will get a 500 error, instead of the message banner saying that the Cephadm orchestrator is not enabled.

Environment

  • ceph version string: master (not tested with older versions)
  • Cluster details: ceph-dev

How reproducible

Steps:

  1. Launch ceph-dev (or vstart cluster)
  2. Access the mentioned pages

Actual results

500 internal server error message pops up.

Expected results

No error notification appears, and an information box states that cephadm orchestrator is not enabled.

Additional info

Traceback (most recent call last):
  File "/ceph/src/pybind/mgr/orchestrator/_interface.py", line 125, in wrapper
    return OrchResult(f(*args, **kwargs))
  File "/ceph/src/pybind/mgr/test_orchestrator/module.py", line 152, in describe_service
    all_daemons = self._get_ceph_daemons()
  File "/ceph/src/pybind/mgr/test_orchestrator/module.py", line 116, in _get_ceph_daemons
    out = map(str, check_output(['ps', 'aux']).splitlines())
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ps': 'ps'
2022-04-05T08:53:41.095+0000 7f8225665700  0 [dashboard ERROR exception] Internal Server Error
Traceback (most recent call last):
  File "/ceph/src/pybind/mgr/dashboard/services/exception.py", line 47, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/ceph/src/pybind/mgr/dashboard/controllers/_base_controller.py", line 258, in inner
    ret = func(*args, **kwargs)
  File "/ceph/src/pybind/mgr/dashboard/controllers/_rest_controller.py", line 191, in wrapper
    return func(*vpath, **params)
  File "/ceph/src/pybind/mgr/dashboard/controllers/orchestrator.py", line 33, in _inner
    return method(self, *args, **kwargs)
  File "/ceph/src/pybind/mgr/dashboard/controllers/service.py", line 35, in list
    return [service.to_dict() for service in orch.services.list(service_name=service_name)]
  File "/ceph/src/pybind/mgr/dashboard/services/orchestrator.py", line 38, in inner
    raise_if_exception(completion)
  File "/ceph/src/pybind/mgr/orchestrator/_interface.py", line 228, in raise_if_exception
    raise e

No data to display

Actions

Also available in: Atom PDF