[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 2/8] write iscsi initiator name to kernel cmdline in grub.conf for dracut



---
 storage/devices.py    |    3 +++
 storage/devicetree.py |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index ff65328..a8c350a 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2902,6 +2902,7 @@ class iScsiDiskDevice(DiskDevice, NetworkStorageDevice):
     def __init__(self, device, **kwargs):
         self.node = kwargs.pop("node")
         self.ibft = kwargs.pop("ibft")
+        self.initiator = kwargs.pop("initiator")
         DiskDevice.__init__(self, device, **kwargs)
         NetworkStorageDevice.__init__(self, host_address=self.node.address)
         log.debug("created new iscsi disk %s %s:%d" % (self.node.name, self.node.address, self.node.port))
@@ -2921,6 +2922,8 @@ class iScsiDiskDevice(DiskDevice, NetworkStorageDevice):
         netroot += "@%s::%d::%s" % (self.node.address, self.node.port,
                                     self.node.name)
 
+        netroot += " iscsi_initiator=%s" % self.initiator
+
         return netroot
 
 class FcoeDiskDevice(DiskDevice, NetworkStorageDevice):
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 07b9e0c..3a832f4 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -1147,6 +1147,7 @@ class DeviceTree(object):
                                    udev_device_get_iscsi_address(info),
                                    udev_device_get_iscsi_port(info))
             kwargs["ibft"] = kwargs["node"] in self.iscsi.ibftNodes
+            kwargs["initiator"] = self.iscsi.initiator
             log.debug("%s is an iscsi disk" % name)
         elif udev_device_is_fcoe(info):
             diskType = FcoeDiskDevice
-- 
1.6.4.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]