mirror of
https://github.com/ceph/ceph
synced 2025-01-01 00:22:25 +00:00
mgr/prometheus: Skip bogus entries
The osd data can contain bogus '-' entries, skip these when populating osd metadata and disk occupation. Signed-off-by: Boris Ranto <branto@redhat.com>
This commit is contained in:
parent
9bc0b8b985
commit
965aaad527
@ -284,6 +284,12 @@ class Module(MgrModule):
|
||||
id_ = osd['osd']
|
||||
p_addr = osd['public_addr'].split(':')[0]
|
||||
c_addr = osd['cluster_addr'].split(':')[0]
|
||||
if p_addr == "-" or c_addr == "-":
|
||||
self.log.info(
|
||||
"Missing address metadata for osd {0}, skipping occupation"
|
||||
" and metadata records for this osd".format(id_)
|
||||
)
|
||||
continue
|
||||
dev_class = next((osd for osd in osd_devices if osd['id'] == id_))
|
||||
self.metrics['osd_metadata'].set(1, (
|
||||
c_addr,
|
||||
|
Loading…
Reference in New Issue
Block a user