[PATCH blivet rhel7-branch] (v2) Update format of iscsi device becoming multipath member (#740105)

Radek Vykydal rvykydal at redhat.com
Fri Dec 6 15:09:46 UTC 2013


This is slightly modified patch I already sent some months ago.  Following
Dave's comments it is more general (checking all disks including FCoE, not only
iSCSI as the V1)

We repopulate device tree after add iscsi device dialog in which a login to
some target happened. One issue with this is that format of iscsi device
populated earlier that would make a multipath member together with iscsi device
added in later run of iscsi dialog is not updated to be of multipath_member
type.

So we'd need either 1) require adding of all multipath members in one add iscsi
dialog instance, which would require reworking UI to allow adding nodes of more
targets (ie targets with different IP reachable via different subnets) in one
iscsi dialog; or 2) update the original iscsi device format in devicetree.
---
 blivet/devicetree.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index b48a4ea..c62c54a 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1018,6 +1018,14 @@ class DeviceTree(object):
                 # make sure any device we found is an md device
                 device = None
 
+        # newly added device (eg iSCSI) could make this one a multipath member
+        if device and device.isDisk and \
+            devicelibs.mpath.is_multipath_member(device.path) and \
+            device.format and device.format.type != "multipath_member":
+                log.debug("%s newly detected as multipath member, dropping old format" % device.name)
+                info["ID_FS_TYPE"] = "multipath_member"
+                device.format = formats.DeviceFormat()
+
         #
         # The first step is to either look up or create the device
         #
-- 
1.7.11.7



More information about the anaconda-patches mailing list