From 84b5ee50cadc4a6caf2fd3e608886c01472d6555 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 12 Mar 2024 14:22:22 +0100
Subject: [PATCH] Fix scanning partitions on RAID arrays (#2269133)
We cannot use get_device_by_device_id here because we get name
from udev.
---
blivet/populator/helpers/partition.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/blivet/populator/helpers/partition.py b/blivet/populator/helpers/partition.py
index 2548f0e9..9257407e 100644
--- a/blivet/populator/helpers/partition.py
+++ b/blivet/populator/helpers/partition.py
@@ -46,21 +46,21 @@ class PartitionDevicePopulator(DevicePopulator):
log_method_call(self, name=name)
sysfs_path = udev.device_get_sysfs_path(self.data)
- device = self._devicetree.get_device_by_device_id(name)
+ device = self._devicetree.get_device_by_name(name)
if device:
return device
disk = None
disk_name = udev.device_get_partition_disk(self.data)
if disk_name:
- disk = self._devicetree.get_device_by_device_id(disk_name)
+ disk = self._devicetree.get_device_by_name(disk_name)
if disk is None:
# create a device instance for the disk
disk_info = six.next((i for i in udev.get_devices()
if udev.device_get_name(i) == disk_name), None)
if disk_info is not None:
self._devicetree.handle_device(disk_info)
- disk = self._devicetree.get_device_by_device_id(disk_name)
+ disk = self._devicetree.get_device_by_name(disk_name)
if disk is None:
# if the disk is still not in the tree something has gone wrong
--
2.44.0