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.