]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: prometheus rules internal server error
authorNizamudeen A <nia@redhat.com>
Tue, 26 Apr 2022 10:19:09 +0000 (15:49 +0530)
committerNizamudeen A <nia@redhat.com>
Tue, 23 Aug 2022 06:53:10 +0000 (12:23 +0530)
commitae15a90ac1ed0b446bad2c940abaaf2424f6e594
treef17ac79478a55a413ba6ee21560ad0de334d6fbd
parent4bc544cf2b849ffc8da35b1040c5ec16e9327009
mgr/dashboard: prometheus rules internal server error

After we increase/decrease the count of the node-exporter, we get a 500
- Internal server error from api/prometheus/rules endpoint. On further
  debugging its caused by the jsonDecodder, because I guess the expected
input for the json.loads() is not a json formatted input. So to fix
that issue I can either do an error handling on the json.loads() or I
can move the json.loads() on the already existing try block. I went for
the second approach here.

Fixes: https://tracker.ceph.com/issues/54356
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 672e27cbd2d66f87afa5e9e33537f333eadfb243)
src/pybind/mgr/dashboard/controllers/prometheus.py