]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/prometheus: improve Prometheus module cache 35918/head
authorPatrick Seidensal <pseidensal@suse.com>
Tue, 9 Jun 2020 10:35:00 +0000 (12:35 +0200)
committerLaura Paduano <lpaduano@suse.com>
Fri, 3 Jul 2020 12:18:59 +0000 (14:18 +0200)
commit58078d7a49da5a9b2b7069fa47edcc4c18ac320d
tree2ce18004a2dc8f187ee88305ac6e0962f712bad3
parent8bfdf6e5d126191e84168650f254f47633a572c4
mgr/prometheus: improve Prometheus module cache

Improve cache by running requests in a thread and prevent multiple
requests to Ceph from multiple sources (e.g. Prometheus instances) which
increase load on the manager.

Fixes: https://tracker.ceph.com/issues/45554
Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
(cherry picked from commit fa69d8e1112d2688e2979ab10c303d1facb6bc76)

 Conflicts:
src/pybind/mgr/prometheus/module.py
- line 1096 if condition block changed
- second commit "mgr/prometheus: enable mypy type checking for prometheus module"
  is not required for the backport as discussed with Patrick
  who is the creator of the original PR.
doc/mgr/prometheus.rst
src/pybind/mgr/prometheus/module.py