]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/prometheus: Cast collect_timeout (scrape_interval) to float 31107/head
authorBenjeman Meekhof <bmeekhof@users.noreply.github.com>
Mon, 29 Jul 2019 14:28:40 +0000 (10:28 -0400)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Thu, 24 Oct 2019 03:19:46 +0000 (10:19 +0700)
commit93cc92f3efd184701adcdc0ab9b0304020895f48
tree08c517d672009afe55b585d5b90f2524b8381e39
parent5b7773dd43f91886a1db6e99095b38d58806502b
mgr/prometheus: Cast collect_timeout (scrape_interval) to float

If set by user scrape_interval option is returned as non-float by get_localized_module_option.
Metric cache timeout comparison always returns true and data is never refreshed.

Fixes: https://tracker.ceph.com/issues/40997
Signed-off-by: Ben Meekhof <bmeekhof@umich.edu>
(cherry picked from commit 26a74a0d83e068b0bb762c4c7066b4b195187e94)

Conflicts:
- path: src/pybind/mgr/prometheus/module.py
  comment: get_localized_module_option() in master, get_localized_config() in luminous
src/pybind/mgr/prometheus/module.py