Ignore invalid/empty UUIDs for NVMe namespaces
This commit is contained in:
parent
ecea39e484
commit
cc78983fd6
@ -0,0 +1,41 @@
|
||||
From 8f61c9ba7241daa6b068355eafb39b1711b12371 Mon Sep 17 00:00:00 2001
|
||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
||||
Date: Wed, 10 Apr 2024 13:41:35 +0200
|
||||
Subject: [PATCH] Ignore invalid/empty UUIDs for NVMe namespaces
|
||||
|
||||
Fixes: #1221
|
||||
---
|
||||
blivet/populator/helpers/disk.py | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/blivet/populator/helpers/disk.py b/blivet/populator/helpers/disk.py
|
||||
index 4a7daa1d1..3ac3f4089 100644
|
||||
--- a/blivet/populator/helpers/disk.py
|
||||
+++ b/blivet/populator/helpers/disk.py
|
||||
@@ -27,6 +27,8 @@
|
||||
from gi.repository import BlockDev as blockdev
|
||||
from gi.repository import GLib
|
||||
|
||||
+import uuid
|
||||
+
|
||||
from ... import udev
|
||||
from ... import util
|
||||
from ...devices import DASDDevice, DiskDevice, FcoeDiskDevice, iScsiDiskDevice
|
||||
@@ -257,10 +259,14 @@ def _get_kwargs(self):
|
||||
log.debug("Failed to get namespace info for %s: %s", path, str(err))
|
||||
else:
|
||||
kwargs["nsid"] = ninfo.nsid
|
||||
- kwargs["uuid"] = ninfo.uuid
|
||||
kwargs["eui64"] = ninfo.eui64
|
||||
kwargs["nguid"] = ninfo.nguid
|
||||
|
||||
+ if ninfo.uuid and ninfo.uuid != uuid.UUID(int=0):
|
||||
+ kwargs["uuid"] = ninfo.uuid
|
||||
+ else:
|
||||
+ kwargs["uuid"] = None
|
||||
+
|
||||
log.info("%s is an NVMe local namespace device", udev.device_get_name(self.data))
|
||||
return kwargs
|
||||
|
||||
--
|
||||
2.27.0
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
Name: python-blivet
|
||||
Version: 3.8.2
|
||||
Release: 3
|
||||
Release: 4
|
||||
Epoch: 1
|
||||
Summary: A python module for system storage configuration
|
||||
License: LGPL-2.1-or-later
|
||||
@ -24,6 +24,8 @@ patch9001: blivet-3.4.2-sw.patch
|
||||
%endif
|
||||
patch9002: Incomplete-Chineseization-of-disk-mount.patch
|
||||
|
||||
patch6001: backport-Ignore-invalid-empty-UUIDs-for-NVMe-namespaces.patch
|
||||
|
||||
%description
|
||||
The python-blivet package is a python module for examining and modifying
|
||||
storage configuration.
|
||||
@ -124,6 +126,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Mon Apr 15 2024 sunhai<sunhai10@huawei.com> - 1:3.8.2-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:Ignore invalid/empty UUIDs for NVMe namespaces
|
||||
|
||||
* Tue Mar 26 2024 sunhai<sunhai10@huawei.com> - 1:3.8.2-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user