cephmetrics icon indicating copy to clipboard operation
cephmetrics copied to clipboard

OSD collector does not detect encrypted bluestore devices

Open wyllys66 opened this issue 7 years ago • 1 comments

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')

wyllys66 avatar Aug 23 '18 13:08 wyllys66

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.

pcuzner avatar Aug 24 '18 02:08 pcuzner