From: Jan Fajerski Date: Thu, 10 Aug 2017 16:09:17 +0000 (+0200) Subject: pybind/mgr/prometheus: no need to wait for notify event X-Git-Tag: v12.2.2~61^2~80 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ef5c88ef08ab9950ee8d7d4acda032b5a54f2f5;p=ceph.git pybind/mgr/prometheus: no need to wait for notify event If stats or perf counters are not available they won't be emitted. Signed-off-by: Jan Fajerski (cherry picked from commit ead0973d7dd12fe985390891c80f1bc15f7b9aec) --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index b1230c7ab857..27184497a39f 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -327,10 +327,6 @@ class Module(MgrModule): return self.metrics def notify(self, ntype, nid): - ''' Just try to sync and not run until we're notified once ''' - if not self.notified: - self.serving = True - self.notified = True if ntype == 'perf_schema_update': daemon_type, daemon_id = nid.split('.') self._get_ordered_schema( @@ -366,9 +362,6 @@ class Module(MgrModule): "server_addr: %s server_port: %s" % (server_addr, server_port) ) - # wait for first notification (of any kind) to start up - # while not self.serving: - # time.sleep(1) cherrypy.config.update({ 'server.socket_host': server_addr,