If all members of an MD (FW) RAID container are ignored, the container itself should be ignored too. Otherwise it is later checked for a number of (non-ignored) children which is zero and a cryptic/inaccurate warning is shown to the user (as described in the bug).
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- storage/devicetree.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/storage/devicetree.py b/storage/devicetree.py index f0733f0..a85c50e 100644 --- a/storage/devicetree.py +++ b/storage/devicetree.py @@ -946,7 +946,13 @@ class DeviceTree(object): # the filter ui. Note that making the ui use md names instead is not # possible as the md names are simpy md# and we cannot predict the # if udev_device_get_md_level(info) == "container": - return False + # we should ignore the container if all its members are ignored + container_paths = info["DEVLINKS"].split() + container_paths.append(info["DEVNAME"]) + devices = udev_get_block_devices() + members = (dev_info for dev_info in devices + if udev_device_get_md_container(dev_info) in container_paths) + return all(self.isIgnored(member) for member in members)
if udev_device_get_md_container(info) and \ udev_device_get_md_name(info):