[PATCH rhel6-branch] Increment MD container child counter even if its volumes are ignored (#1120640)

Artur Paszkiewicz artur.paszkiewicz at intel.com
Thu Jul 17 11:39:19 UTC 2014


Volumes which are not selected in Specialized Storage Devices are
ignored in addUdevDevice. This causes that their parent container
won't have its child counter incremented, which can later cause an
incorrect unusedRaidMembersWarning.

Resolves: rhbz#1120640
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz at intel.com>
---
 storage/devicetree.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 4045cdf..b9ea399 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1328,6 +1328,13 @@ class DeviceTree(object):
                 # slice off the "/dev/" part, lvm filter cares only about the rest
                 partitions_paths = [p[5:] for p in partitions_paths]
                 map(lvm.lvm_cc_addFilterRejectRegexp, partitions_paths)
+
+            if udev_device_get_md_container(info):
+                parentName = devicePathToName(udev_device_get_md_container(info))
+                container = self.getDeviceByName(parentName)
+                if container:
+                    container.addChild()
+
             return
 
         log.debug("scanning %s (%s)..." % (name, sysfs_path))
-- 
1.8.4.5



More information about the anaconda-patches mailing list