Fuel7.0 Deployment using multiple NMVe disks fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
High
|
Alexander Kislitsky | ||
7.0.x |
Fix Released
|
High
|
Sergii Rizvan |
Bug Description
In Fuel 7.0 with using more than 1 NMVe disk the deployment fails.
Fuel agens comes with an error
Disk not found: <diskname> , where diskname is nvme1n1 or nvme2n1
The error comes from the fuction '_disk_dev' in the fuel_agent / drivers / nailgun.py
So i've been digging arround and i found the cause of the error
In the bootstrap image based on CentOS 'udevadm' in not working correctly. It returns the id of the disk incorrectly. Id's of two nvme disks are the same.
Here is an example of a server with 3 disks, 1 hardware raid and two nvme disks. (which are on the pci bus)
[root@bootstrap ~]# udevadm info --export-db | grep /dev/disk
E: DEVLINKS=
E: DEVLINKS=
E: DEVLINKS=
This causes the function 'match_device' in fuel_agent / drivers /nailgun.py to return two block devices (for example an array ['/dev/
Which in the function '_dev_disk' causes the var 'len(found) > 1' and throws the Disk not found error.
a temponary work arroud i used in (and i then succesfully deployed an env) is to modify the function '_dev_disk' to this
def _disk_dev(self, ks_disk):
# first we try to find a device that matches ks_disk
# comparing by-id and by-path links
matched = [hu_disk['device'] for hu_disk in self.hu_disks
# if we can not find a device by its by-id and by-path links
# we try to find a device by its name
fallback = [hu_disk['device'] for hu_disk in self.hu_disks
# fix for centOS since udevadm is not reporting correctly
# choose in case of nvme disks only fallback method
if any(f.find('nvme') > 0 for f in matched):
matched = False
# end of fix
found = matched or fallback
if not found or len(found) > 1:
raise errors.
so in case of nvme, only use the fallback method.
Here is some data to play with:
hu_disks
[{'bspec': {'alignoff': '0',
'iomin': '512',
'ioopt': '0',
'maxsect': '256',
'pbsz': '512',
'ra': '256',
'ro': '0',
'size64': '800166076416',
'ss': '512',
'sz': '1562824368'},
'device': '/dev/nvme0n1',
'espec': {'removable': '0', 'vendor': '0x8086'},
'uspec': {'DEVLINKS': ['/dev/
'/dev/
'/dev/
'DEVNAME': '/dev/nvme0n1',
'DEVPATH': '/devices/
'DEVTYPE': 'disk',
'ID_MODEL': 'INTEL_SSDPE2ME80',
'ID_
'ID_VENDOR': 'NVMe',
'ID_WWN': '0x65cd2e408086
'MAJOR': '253',
'MINOR': '0'}},
{'bspec': {'alignoff': '0',
'iomin': '512',
'ioopt': '0',
'maxsect': '256',
'pbsz': '512',
'ra': '256',
'ro': '0',
'size64': '800166076416',
'ss': '512',
'sz': '1562824368'},
'device': '/dev/nvme1n1',
'espec': {'removable': '0', 'vendor': '0x8086'},
'uspec': {'DEVLINKS': ['/dev/
'/dev/
'/dev/
'DEVNAME': '/dev/nvme1n1',
'DEVPATH': '/devices/
'DEVTYPE': 'disk',
'ID_MODEL': 'INTEL_SSDPE2ME80',
'ID_
'ID_VENDOR': 'NVMe',
'ID_WWN': '0x65cd2e408086
'MAJOR': '253',
'MINOR': '64'}},
{'bspec': {'alignoff': '0',
'iomin': '4096',
'ioopt': '0',
'maxsect': '560',
'pbsz': '4096',
'ra': '256',
'ro': '0',
'size64': '79456894976',
'ss': '512',
'sz': '155189248'},
'device': '/dev/sda',
'espec': {'removable': '0',
'state': 'running',
'timeout': '90',
'vendor': 'LSI'},
'uspec': {'DEVLINKS': ['/dev/block/8:0',
'/dev/
'/dev/
'/dev/
'DEVNAME': '/dev/sda',
'DEVPATH': '/devices/
'DEVTYPE': 'disk',
'ID_BUS': 'scsi',
'ID_MODEL': 'SMC3108',
'ID_
'ID_VENDOR': 'LSI',
'ID_WWN': '0x600304801c1e
'MAJOR': '8',
'MINOR': '0'}}]
ks_disk
{'extra': ['disk/
'free_space': 762469,
'id': 'disk/by-
'name': 'nvme0n1',
'size': 763097,
'type': 'disk',
'volumes': [{'size': 300, 'type': 'boot'},
{'file_system': 'ext2',
'mount': '/boot',
'name': 'Boot',
'size': 200,
'type': 'raid'},
{'size': 0, 'type': 'lvm_meta_pool'},
{'lvm_meta_size': 64, 'size': 55360, 'type': 'pv', 'vg': 'os'},
{'lvm_meta_size': 64, 'size': 707237, 'type': 'pv', 'vg': 'vm'}]}
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in fuel: | |
assignee: | nobody → Fuel Python Team (fuel-python) |
milestone: | none → 8.0 |
importance: | Undecided → High |
tags: | added: ibp |
tags: | added: area-python |
Changed in fuel: | |
assignee: | Fuel Python Team (fuel-python) → Alexander Kislitsky (akislitsky) |
tags: | added: support |
tags: | added: team-bugfix |
tags: | added: 7.0-mu-2 |
tags: | added: on-verification |
Hi, Atze de Vries
Thanks for perfectly reported issue.