New public function to check whether a software RAID is candidate for installation#1411
Merged
Conversation
|
❌ Autosubmission job #15213738959 failed |
|
✅ Autosubmission job #15213738959 successfully finished |
ancorgs
added a commit
to agama-project/agama
that referenced
this pull request
May 26, 2025
This pull request adapts Agama to some historical behavior of YaST, but (hopefully) in a more structured and explicit way. ## Historical background YaST considers some software RAIDs to be bootable and, thus, it: - offers them as an option in the Guided Setup - considers them as candidates for the initial proposal The criteria used by YaST is kind of arbitrary, based on some heuristic imposed by SUSE partners and refined over time. See [this explanation](https://github.com/yast/yast-storage-ng/blob/db1febb341453c8cc4972dfe36affe55c013f435/src/lib/y2storage/disk_analyzer.rb#L131). To not break the existing use cases, we should keep the ability in Agama to install on those RAIDs. That’s relevant for: 1. The initial proposal 2. The web UI 3. The selection of the implicit boot device (when is omitted in the configuration) But we also need the option to manipulate other RAID devices that are not considered to be candidates for a normal installation (ie. bootable). For example, to be able to select them at the web UI with any purpose. ## Implementation This pull request: - Sets the basis for all scenarios by providing a clear way to distinguish different types of RAIDs (and drives). - Improves the situation at 3 (ie. when resolving the omitted boot device) To address the first goal, `System` now offers four methods `available_drives`, `candidate_drives`, `available_md_raids` and `candidate_md_raids`. Check the documentation for the exact meaning. To address the latter goal, this introduces the ability to automatically determine the boot device if the storage configuration omits `boot.device` but specifies the root partition must be located at a bootable (candidate) RAID. ## Dependencies This PR depends on yast/yast-storage-ng#1411
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Agama needs to check whether a software RAID can be used as candidate for installation according to the current YaST heuristics, but the method is private.
Needed for agama-project/agama#2388
Solution
Extract some logic to a new
DiskAnalyzer#candidate_software_raid?public method.