41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
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
|