anaconda/bugfix-Reset-the-RAID-level-of-the-device-request-1828092.patch
xuxiaolong 27667a0985 sync 49 fixbug from github
(cherry picked from commit 0cd8608199f6b9726c451e0e9fe3be4a1dbe7cca)
2021-04-27 14:12:18 +08:00

32 lines
1.3 KiB
Diff

From d76c6060ea59215dbb90299b28fc8d59abf8e0fa Mon Sep 17 00:00:00 2001
From: Vendula Poncova <vponcova@redhat.com>
Date: Wed, 13 May 2020 18:59:26 +0200
Subject: [PATCH] Reset the RAID level of the device request (#1828092)
In the custom partitioning spoke, always reset the RAID level of the
device request when the device type changes. Otherwise, the new type
doesn't have to support the old RAID level.
Resolves: rhbz#1828092
---
pyanaconda/ui/gui/spokes/custom_storage.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom_storage.py b/pyanaconda/ui/gui/spokes/custom_storage.py
index 4e174a5f5..f0596263b 100644
--- a/pyanaconda/ui/gui/spokes/custom_storage.py
+++ b/pyanaconda/ui/gui/spokes/custom_storage.py
@@ -1729,7 +1729,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageCheckHandler):
# this has to be done before calling populate_raid since it will need
# the raid level combo to contain the relevant raid levels for the new
# device type
- self._populate_raid()
+ self._request.device_raid_level = get_default_raid_level(new_type)
+ self._populate_raid(self._request.device_raid_level)
# Generate a new container configuration for the new type.
self._request = DeviceFactoryRequest.from_structure(
--
2.23.0