--- pyanaconda/ui/gui/spokes/custom.py | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 7edfdd0..da548c2 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1840,7 +1840,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
log.debug("page clicked: %s" % getattr(page, "pageTitle", None)) if self._current_selector: - self._save_right_side(self._current_selector) + nb_page = self._partitionsNotebook.get_current_page() + log.debug("notebook page = %s" % nb_page) + if nb_page != NOTEBOOK_LUKS_PAGE: + self._save_right_side(self._current_selector) + self._current_selector.set_chosen(False) self._current_selector = None
Fix translation from AUTOPART_TYPE_BTRFS to DEVICE_TYPE_BTRFS so we create new devices as btrfs instead of md when btrfs is the default.
Also close gaps in raid feature selection ui and add checks to save_right_side to prevent some invalid raid setups. --- pyanaconda/ui/gui/spokes/custom.py | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index da548c2..515a9a7 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -136,9 +136,11 @@ raid_level_features = {"raid0": ["Performance"], # disabled features by raid_level raid_disabled_features = {"raid1": ["Error", "DistError", "RedundantError"], "raid10": ["Error", "DistError", "RedundantError"], - "raid4": ["Redundancy", "DistError", "RedundantError"], - "raid5": ["Redundancy", "Error", "RedundantError"], - "raid6": ["Redundancy", "Error", "DistError"]} + "raid4": ["Performance", "Redundancy", "DistError", "RedundantError"], + "raid5": ["Performance", "Redundancy", "Error", "RedundantError"], + "raid6": ["Performance", "Redundancy", "Error", "DistError"], + None: ["Error", "DistError", "RedundantError"], +}
# reference raid level by feature name feature_raid_levels = {"Performance": "raid0", @@ -872,6 +874,15 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): error = _("%s cannot be encrypted") % fs_type elif mountpoint == "/" and device.format.exists and not reformat: error = _("You must create a new filesystem on the root device.") + elif device_type == DEVICE_TYPE_MD and raid_level in (None, "single"): + error = _("Devices of type %s require a valid RAID level selection.") % DEVICE_TEXT_MD + + if not error and raid_level not in (None, "single"): + md_level = mdraid.raidLevel(raid_level) + min_disks = mdraid.get_raid_min_members(md_level) + if len(self._device_disks) < min_disks: + error = _("The RAID level you have selected requires more " + "disks than you currently have selected.")
if error: self.window.set_info(Gtk.MessageType.WARNING, error) @@ -1579,7 +1590,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
device_type_from_autopart = {AUTOPART_TYPE_LVM: DEVICE_TYPE_LVM, AUTOPART_TYPE_PLAIN: DEVICE_TYPE_PARTITION, - AUTOPART_TYPE_BTRFS: DEVICE_TYPE_MD} + AUTOPART_TYPE_BTRFS: DEVICE_TYPE_BTRFS} device_type = device_type_from_autopart[self.data.autopart.type] if device_type != DEVICE_TYPE_PARTITION and \ mountpoint == "/boot/efi":
anaconda-patches@lists.fedorahosted.org