Bug #22612
closedceph-mgr's prometheus module crashes when osd is out
0%
Description
Using ceph-mgr-12.2.2-0.el7.x86_64 when an osd is out (`ceph osd out <id>`) and one curls the metrcis, I get the folowing backtrace.
[08/Jan/2018:13:16:21] HTTP Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 656, in respond
response.body = self.handler()
File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 188, in call
self.body = self.oldhandler(args, **kwargs)
File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 34, in call
return self.callable(*self.args, **self.kwargs)
File "/usr/lib64/ceph/mgr/prometheus/module.py", line 386, in metrics
metrics = global_instance().collect()
File "/usr/lib64/ceph/mgr/prometheus/module.py", line 324, in collect
self.get_pg_status()
File "/usr/lib64/ceph/mgr/prometheus/module.py", line 266, in get_pg_status
self.metrics[path].set(value)
KeyError: 'pg_recovery_wait'
[08/Jan/2018:13:16:21] HTTP
Request Headers:
HOST: 88.99.93.16:9283
Remote-Addr: ::ffff:88.99.140.79
ACCEPT: */
USER-AGENT: curl/7.29.0