From: Sage Weil Date: Thu, 6 Dec 2018 16:02:35 +0000 (-0600) Subject: ceph-volume: Micron SSDs don't include vendor name in ID_SERIAL X-Git-Tag: v14.1.0~678^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3e4a638c931a5198aca74dc4037d0b03d5e563ba;p=ceph-ci.git ceph-volume: Micron SSDs don't include vendor name in ID_SERIAL Signed-off-by: Sage Weil --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index 9b1ae6a5ab5..1569682ae2d 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -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