storage: also allow raid devices to match install-media: true #2142
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.
If the installation media is a RAID (this is a mostly a OEM use-case), using
{"install-media": true}
as a disk matcher fails to find the expected RAID device.This is because in the previous implementation, only
Disk
objects could have_has_in_use_partitions=True
.We now also set
_has_in_use_partitions=True
on involvedRaid
objects.In theory, this means that for a given RAID, the matcher can return one
Raid
object + N *Disk
objects.In practice though, we only use disk matchers on "potential boot disks". This should exclude from the equation
Disk
objects that are part of aRaid
. So we can reliably expect a single match.LP:#2094966