From 8a6573b5161688330fde9b69f616dff1a058b0b9 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Mon, 23 Sep 2024 10:26:30 +0200 Subject: [PATCH] Fix checking for NVMe plugin availability Resolves: RHEL-28124 --- ...hecking-for-NVMe-plugin-availability.patch | 27 +++++++++++++++++++ python-blivet.spec | 11 +++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 0028-Fix-checking-for-NVMe-plugin-availability.patch diff --git a/0028-Fix-checking-for-NVMe-plugin-availability.patch b/0028-Fix-checking-for-NVMe-plugin-availability.patch new file mode 100644 index 0000000..55fb740 --- /dev/null +++ b/0028-Fix-checking-for-NVMe-plugin-availability.patch @@ -0,0 +1,27 @@ +From 7677fc312b821a9c67750220f2494d06f2357780 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 18 Sep 2024 15:30:05 +0200 +Subject: [PATCH] Fix checking for NVMe plugin availability + +--- + blivet/nvme.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/blivet/nvme.py b/blivet/nvme.py +index 4309dea3..72a47070 100644 +--- a/blivet/nvme.py ++++ b/blivet/nvme.py +@@ -76,6 +76,10 @@ class NVMe(object): + 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): +-- +2.46.1 + diff --git a/python-blivet.spec b/python-blivet.spec index 247cc12..519e9b1 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -23,7 +23,7 @@ Version: 3.6.0 #%%global prerelease .b2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 -Release: 18%{?prerelease}%{?dist} +Release: 19%{?prerelease}%{?dist} Epoch: 1 License: LGPLv2+ %global realname blivet @@ -56,7 +56,8 @@ Patch22: 0023-Do-not-add-new-PVs-to-the-LVM-devices-file-if-it-doe.patch Patch23: 0024-Added-support-for-PV-grow.patch Patch24: 0025-Stratis-fixes-backport.patch Patch25: 0026-XFS-resize-test-fix.patch -PAtch26: 0027-RHEL96-bugfixes-1.patch +Patch26: 0027-RHEL96-bugfixes-1.patch +Patch27: 0028-Fix-checking-for-NVMe-plugin-availability.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -220,7 +221,11 @@ configuration. %endif %changelog -* Mon Sep 09 2024 Vojtech Trefny - 3.6.0-17 +* Mon Sep 23 2024 Vojtech Trefny - 3.6.0-19 +- Fix checking for NVMe plugin availability + Resolves: RHEL-28124 + +* Mon Sep 09 2024 Vojtech Trefny - 3.6.0-18 - Add a basic read-only support for UDF filesystem Resolves: RHEL-13329 - nvme: Skip startup/write when NVMe plugin isn't available