cephmetrics
cephmetrics copied to clipboard
OSD collector does not detect encrypted bluestore devices
The code for detecting whether or not an OSD is encrypted does not do any checking if the device is bluestore., it just assumes "encrypted = 0".
One possible fix would be to check the path of the block device, similar to the filestore check:
linkpath = os.readlink(block_link)
encrypted = linkpath.startswith('/dev/mapper')
the code pre-dates the the introduction of ceph-volume and lvm based OSDs. Unless I'm mistaken, just checking for the /dev/mapper entry would pick up and OSD defined with LVM too. I think the fact that an osd is encrypted should be part of the osd metadata, which could then be exposed by the prometheus exporter.