From 6da3b93544f41c0759fbd49f1953546b257c9f60 Mon Sep 17 00:00:00 2001 From: bitcoffee <854182924@qq.com> Date: Wed, 19 May 2021 15:03:53 +0800 Subject: [PATCH] Fix issue when ns_info cannot be retrieved for NVDimm namespace (cherry picked from commit e7cac4650b62d99c907fb404eb6e6d088f298a5d) --- anaconda.spec | 9 +++- ...s_info-cannot-be-retrieved-for-NVDim.patch | 48 +++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 bugfix-Fix-issue-when-ns_info-cannot-be-retrieved-for-NVDim.patch diff --git a/anaconda.spec b/anaconda.spec index 5d42e63..190deca 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ %define _empty_manifest_terminate_build 0 Name: anaconda Version: 33.19 -Release: 21 +Release: 22 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -109,6 +109,7 @@ Patch6069: bugfix-Fix-the-logic-for-enabling-latest-updates.patch Patch6070: bugfix-Don-t-enter-spokes-after-we-leave-the-Summary-hub.patch Patch6071: bugfix-do-not-mount-dbus-source.patch Patch6072: fix-xorg-timeout-and-throw-exception.patch +Patch6073: bugfix-Fix-issue-when-ns_info-cannot-be-retrieved-for-NVDim.patch %define dbusver 1.2.3 %define dnfver 3.6.0 @@ -322,6 +323,12 @@ update-desktop-database &> /dev/null || : %{_datadir}/gtk-doc %changelog +* Wed May 19 2021 liuxin - 33.19-22 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix issue when ns_info cannot be retrieved for NVDimm namespace + * Sat May 8 2021 fengtao - 33.19-21 - Type:bugfix - ID:NA diff --git a/bugfix-Fix-issue-when-ns_info-cannot-be-retrieved-for-NVDim.patch b/bugfix-Fix-issue-when-ns_info-cannot-be-retrieved-for-NVDim.patch new file mode 100644 index 0000000..0b22559 --- /dev/null +++ b/bugfix-Fix-issue-when-ns_info-cannot-be-retrieved-for-NVDim.patch @@ -0,0 +1,48 @@ +From 49f6e0e64accb5a1e6590bb08f7986fe7eaec2de Mon Sep 17 00:00:00 2001 +From: Jiri Konecny +Date: Thu, 29 Oct 2020 10:08:09 +0100 +Subject: [PATCH] Fix issue when ns_info cannot be retrieved for NVDimm + namespace + +If we don't skip this part the uncaught exception will raise because we +are +trying to concatenate string and None types. + +This is happening when NVDIMM namespace is set to DEVDAX mode. In this +mode +there is no device to be returned so we will got None from blivet. + +Resolves: rhbz#1891827 +(cherry picked from commit 6afc375b164a802e26802ec4ba54d3446c078091) +--- + pyanaconda/modules/storage/nvdimm/nvdimm.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/pyanaconda/modules/storage/nvdimm/nvdimm.py b/pyanaconda/modules/storage/nvdimm/nvdimm.py +index 4476dd1..5b9c9dc 100644 +--- a/pyanaconda/modules/storage/nvdimm/nvdimm.py ++++ b/pyanaconda/modules/storage/nvdimm/nvdimm.py +@@ -101,6 +101,12 @@ class NVDIMMModule(KickstartBaseModule): + devices_to_ignore = set() + + for ns_name, ns_info in nvdimm.namespaces.items(): ++ # this is happening when namespace is set to DEVDAX mode - block device is not present ++ if ns_info.blockdev is None: ++ log.debug("%s will be skipped - NVDIMM namespace block device information " ++ "can't be retrieved", ns_name) ++ continue ++ + info = udev.get_device(device_node="/dev/" + ns_info.blockdev) + + if info and udev.device_get_format(info) == "iso9660": +@@ -116,8 +122,7 @@ class NVDIMMModule(KickstartBaseModule): + else: + continue + +- if ns_info.blockdev: +- devices_to_ignore.add(ns_info.blockdev) ++ devices_to_ignore.add(ns_info.blockdev) + + return devices_to_ignore + +