]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
prometheus: Fix prometheus shutdown/restart 21748/head
authorBoris Ranto <branto@redhat.com>
Mon, 30 Apr 2018 23:06:50 +0000 (01:06 +0200)
committerBoris Ranto <branto@redhat.com>
Wed, 2 May 2018 08:50:53 +0000 (10:50 +0200)
commita662caa79b8fc30e36df0da93f368b470d26564e
treeedb76ddcda22e38bc3e034409a67ac5977a44701
parent4dde3d355f4a0782c74bcc2b663f4412ae523cc0
prometheus: Fix prometheus shutdown/restart

The prometheus serve method uses block which it should not as it can
cause several problems when shutting down (restarting) ceph-mgr. As a
result the restart of the ceph-mgr module will block until time-out if
the prometheus module is enabled. This fixes the problem by using a
simple simple shutdown_event instead of block() and stopping the server
afterwards.

Signed-off-by: Boris Ranto <branto@redhat.com>
src/pybind/mgr/prometheus/module.py