Comment 1 for bug 1838078

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

The culprit function is in charms.ceph lib/ceph/utils.py:

def unmounted_disks():
    """List of unmounted block devices on the current host."""
    disks = []
    context = pyudev.Context()
    for device in context.list_devices(DEVTYPE='disk'):
        if device['SUBSYSTEM'] == 'block':
            matched = False
            for block_type in [u'dm', u'loop', u'ram', u'nbd']:
                if block_type in device.device_node:
                    matched = True
            if matched:
                continue
            disks.append(device.device_node)
    log("Found disks: {}".format(disks))
    return [disk for disk in disks if not is_device_mounted(disk)]

It would either need to learn about partitions, or the calling function in ceph-osd would need to call another library that would add in partitions.