]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume: Micron SSDs don't include vendor name in ID_SERIAL
authorSage Weil <sage@redhat.com>
Thu, 6 Dec 2018 16:02:35 +0000 (10:02 -0600)
committerSage Weil <sage@redhat.com>
Fri, 7 Dec 2018 15:50:13 +0000 (09:50 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/ceph-volume/ceph_volume/util/device.py

index 9b1ae6a5ab553b0e3af9c77f069d79fa83eed225..1569682ae2d40c42765ba6c31e153b373b462202 100644 (file)
@@ -198,6 +198,9 @@ class Device(object):
             dev_id = '_'.join(p['ID_MODEL'], p['ID_SERIAL_SHORT'])
         elif 'ID_SERIAL' in p:
             dev_id = p['ID_SERIAL']
+            if dev_id.startswith('MTFD'):
+                # Micron NVMes hide the vendor
+                dev_id = 'Micron_' + dev_id
         else:
             # the else branch should fallback to using sysfs and ioctl to
             # retrieve device_id on FreeBSD. Still figuring out if/how the