Skip to content

Commit

Permalink
Merge pull request #1300 from vojtechtrefny/rhel10-branch_nvme-plugin…
Browse files Browse the repository at this point in the history
…-check-fix

Fix checking for NVMe plugin availability
  • Loading branch information
vojtechtrefny authored Sep 30, 2024
2 parents 66dc628 + 3f7adcd commit 514cc68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blivet/devicelibs/mdraid.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ def is_raid_level(cls, level):
hasattr(level, 'get_size')


raid_levels = MDRaidLevels(["raid0", "raid1", "raid4", "raid5", "raid6", "raid10", "linear"])
raid_levels = MDRaidLevels(["raid0", "raid1", "raid4", "raid5", "raid6", "raid10"])

EXTERNAL_DEPENDENCIES = [availability.BLOCKDEV_MDRAID_PLUGIN]
4 changes: 4 additions & 0 deletions blivet/nvme.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ def available(self):
return False
if not hasattr(blockdev.NVMETech, "FABRICS"):
return False
try:
blockdev.nvme.is_tech_avail(blockdev.NVMETech.FABRICS, 0) # pylint: disable=no-member
except (blockdev.BlockDevNotImplementedError, blockdev.NVMEError):
return False
return True

def startup(self):
Expand Down

0 comments on commit 514cc68

Please sign in to comment.