Fix intel biosraid can't get device name causing crashed

(cherry picked from commit dbef6ea7bdbb0510a58fbef6f10ef013daff7dd9)
This commit is contained in:
sun_hai_10 2024-10-22 19:36:50 +08:00 committed by openeuler-sync-bot
parent 5d057b21b7
commit 3b240d962c
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,32 @@
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
Reference:https://github.com/storaged-project/blivet/commit/9d7d0428c81ce592c807f2cefcf7228a1b3d8789
Conflict:NA
---
blivet/udev.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/blivet/udev.py b/blivet/udev.py
index 70fc722f5..667e1f3c9 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.27.0

View File

@ -3,7 +3,7 @@
Name: python-blivet Name: python-blivet
Version: 3.4.2 Version: 3.4.2
Release: 8 Release: 9
Epoch: 1 Epoch: 1
Summary: A python module for system storage configuration Summary: A python module for system storage configuration
License: LGPLv2+ License: LGPLv2+
@ -29,6 +29,9 @@ patch6003: backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch
Patch9001: 0001-Make-sure-we-mount-the-top-level-subvolume-when-moun.patch Patch9001: 0001-Make-sure-we-mount-the-top-level-subvolume-when-moun.patch
patch9002: Incomplete-Chineseization-of-disk-mount.patch patch9002: Incomplete-Chineseization-of-disk-mount.patch
patch6004: backport-Fix-intel-biosraid-cant-get-device-name-causing-crashed.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
storage configuration. storage configuration.
@ -128,6 +131,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README.md %doc README.md
%changelog %changelog
* Tue Oct 22 2024 sunhai<sunhai10@huawei.com> - 1:3.4.2-9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Fix intel biosraid can't get device name causing crashed
* Sat Aug 12 2023 panchenbo <panchenbo@kylinsec.com.cn> - 1:3.4.2-8 * Sat Aug 12 2023 panchenbo <panchenbo@kylinsec.com.cn> - 1:3.4.2-8
- turn on sw_64 loongarch for all arch reorder patchs - turn on sw_64 loongarch for all arch reorder patchs