Project

General

Profile

Actions

Feature #48475

closed

mgr/dashboard: Display a warning message in Dashboard when debug mode is enabled

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

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

0%

Source:
Tags:
Backport:
nautilus, octopus
Reviewed:
Pull request ID:

Description

Display a notification warning after log in, same to the telemetry module notification, when debug mode is enabled. Alternatively use the health check feature to warn the user.

  1. ceph dashboard debug status
  2. ceph dashboard debug enable
  3. ceph dashboard debug disable
  4. ceph config set mgr mgr/dashboard/debug true

If debug mode is enabled and a not existing URL is entered in the browser, sensitive data is logged like

No such file or directory: '/usr/share/ceph/mgr/dashboard/frontend/dist/en-US/test'
{"status": "404 Not Found", "detail": "The path '/test' was not found.", "request_id": "f2eeb159-7925-4de5-bff0-4214b04d24b5", "traceback": "Traceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/cherrypy/lib/static.py\", line 51, in serve_file\n    st = os.stat(path)\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/share/ceph/mgr/dashboard/frontend/dist/en-US/test'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/cherrypy/_cprequest.py\", line 670, in respond\n    response.body = self.handler()\n  File \"/usr/lib/python3.6/site-packages/cherrypy/lib/encoding.py\", line 221, in __call__\n    self.body = self.oldhandler(*args, **kwargs)\n  File \"/usr/lib/python3.6/site-packages/cherrypy/_cptools.py\", line 237, in wrap\n    return self.newhandler(innerfunc, *args, **kwargs)\n  File \"/usr/share/ceph/mgr/dashboard/services/exception.py\", line 88, in dashboard_exception_handler\n    return handler(*args, **kwargs)\n  File \"/usr/lib/python3.6/site-packages/cherrypy/_cpdispatch.py\", line 60, in __call__\n    return self.callable(*self.args, **self.kwargs)\n  File \"/usr/share/ceph/mgr/dashboard/controllers/home.py\", line 126, in __call__\n    return serve_file(full_path)\n  File \"/usr/lib/python3.6/site-packages/cherrypy/lib/static.py\", line 58, in serve_file\n    raise cherrypy.NotFound()\ncherrypy._cperror.NotFound: (404, \"The path '/test' was not found.\")\n", "version": "10.2.1"}

Related issues 2 (0 open2 closed)

Copied to Dashboard - Backport #48652: octopus: mgr/dashboard: Display a warning message in Dashboard when debug mode is enabledResolvedVolker TheileActions
Copied to Dashboard - Backport #48653: nautilus: mgr/dashboard: Display a warning message in Dashboard when debug mode is enabledResolvedVolker TheileActions
Actions

Also available in: Atom PDF