upstream: Fix-intel-biosraid-can-t-get-device-name-causing-crashed

This commit is contained in:
Yurii.Huang 2024-08-22 09:43:39 +08:00
parent 9506a4c118
commit b01532677f
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 9d7d0428c81ce592c807f2cefcf7228a1b3d8789 Mon Sep 17 00:00:00 2001
From: "Yurii.Huang" <yurii.huang@dbappsecurity.com.cn>
Date: Wed, 21 Aug 2024 18:31:04 +0800
Subject: [PATCH] Fix intel biosraid can't get device name causing crashed
crashed with DiskDevice get members property
trace: 'DiskDevice' object has no attribute 'members'
changed: when ID_FS_TYPE is isw_raid_member use SYS_NAME to device name
---
blivet/udev.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/blivet/udev.py b/blivet/udev.py
index 70fc722f..667e1f3c 100644
--- a/blivet/udev.py
+++ b/blivet/udev.py
@@ -243,6 +243,10 @@ def device_get_name(udev_info):
elif device_get_format(udev_info) == "linux_raid_member":
# MD RAID member -> use SYS_NAME
name = udev_info["SYS_NAME"]
+ elif device_get_format(udev_info) == "isw_raid_member":
+ # intel software biosraid
+ # MD RAID member -> use SYS_NAME
+ name = udev_info["SYS_NAME"]
elif device_is_partition(udev_info):
# partition on RAID -> construct name from MD_DEVNAME + partition number
# for partitions on named RAID we want to use the raid name, not
--
2.20.1

View File

@ -3,7 +3,7 @@
Name: python-blivet
Version: 3.2.2
Release: 12
Release: 13
Epoch: 1
Summary: A python module for system storage configuration
License: LGPLv2+
@ -31,6 +31,7 @@ Patch6005: backport-Ignore-devices-marked-as-hidden-in-sysfs-1856974.patch
Patch6006: backport-Fix-reading-hidden-sysfs-attribute.patch
Patch6007: backport-Fix-logging-information-about-ignoring-hidden-device.patch
Patch9002: Incomplete-Chineseization-of-disk-mount.patch
Patch9003: 9003-Fix-intel-biosraid-can-t-get-device-name-causing-crashed.patch
Patch6008: backport-Exclude-unusable-disks-from-PartitionFactory-1.patch
Patch6009: backport-Exclude-unusable-disks-from-PartitionFactory-2.patch
@ -134,6 +135,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README
%changelog
* Tue Aug 27 2024 Yurii.Huang<yurii.huang@dbappsecurity.com.cn> - 1:3.2.2-13
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Fix isw_raid_member disk get members property crashed
* Tue Dec 27 2022 hanhuihui<hanhuihui5@huawei.com> - 1:3.2.2-12
- Type:bugfix
- ID:NA