!128 fix empty UUIDs for NVMe namespaces

From: @sun_hai_10 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
This commit is contained in:
openeuler-ci-bot 2024-05-10 01:43:55 +00:00 committed by Gitee
commit e0d6ebdcf2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From f1aa249bc848634ccd1d6694b59321eac31b5f0e Mon Sep 17 00:00:00 2001
From: sunhai <sunhai10@huawei.com>
Date: Wed, 17 Apr 2024 00:20:07 +0800
Subject: [PATCH] fix empty UUIDs for NVMe namespaces
---
blivet/populator/helpers/disk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/populator/helpers/disk.py b/blivet/populator/helpers/disk.py
index 43c902a..b9ec843 100644
--- a/blivet/populator/helpers/disk.py
+++ b/blivet/populator/helpers/disk.py
@@ -287,7 +287,7 @@ class NVMeNamespaceDevicePopulator(DiskDevicePopulator):
kwargs["eui64"] = ninfo.eui64
kwargs["nguid"] = ninfo.nguid
- if ninfo.uuid and ninfo.uuid != uuid.UUID(int=0):
+ if ninfo.uuid and str(ninfo.uuid) != str(uuid.UUID(int=0)):
kwargs["uuid"] = ninfo.uuid
else:
kwargs["uuid"] = None
--
2.43.0

View File

@ -3,7 +3,7 @@
Name: python-blivet Name: python-blivet
Version: 3.8.2 Version: 3.8.2
Release: 4 Release: 5
Epoch: 1 Epoch: 1
Summary: A python module for system storage configuration Summary: A python module for system storage configuration
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
@ -25,6 +25,7 @@ patch9001: blivet-3.4.2-sw.patch
patch9002: Incomplete-Chineseization-of-disk-mount.patch patch9002: Incomplete-Chineseization-of-disk-mount.patch
patch6001: backport-Ignore-invalid-empty-UUIDs-for-NVMe-namespaces.patch patch6001: backport-Ignore-invalid-empty-UUIDs-for-NVMe-namespaces.patch
patch9003: bugfix-fix-empty-UUIDs-for-NVMe-namespaces.patch
%description %description
The python-blivet package is a python module for examining and modifying The python-blivet package is a python module for examining and modifying
@ -126,6 +127,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README.md %doc README.md
%changelog %changelog
* Fri May 10 2024 sunhai<sunhai10@huawei.com> - 1:3.8.2-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix empty UUIDs for NVMe namespaces
* Mon Apr 15 2024 sunhai<sunhai10@huawei.com> - 1:3.8.2-4 * Mon Apr 15 2024 sunhai<sunhai10@huawei.com> - 1:3.8.2-4
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA