[PATCH 2/8] Only set iscsi nodes to autostart when none of the LUN's contain /

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

 



One iscsi target / node can have multiple LUN's currently we would then set
it to autostart if any of the LUN's was not used for /, the correct thing
todo is to only set it to autostart if none of the LUN's are used for /
---
 storage/iscsi.py |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/storage/iscsi.py b/storage/iscsi.py
index 13ddc08..51b0eb8 100644
--- a/storage/iscsi.py
+++ b/storage/iscsi.py
@@ -261,16 +261,17 @@ class iscsi(object):
 
         if not flags.test:
             root = anaconda.id.storage.fsset.rootDevice
-            disks = anaconda.id.storage.devicetree.getDevicesByType("iscsi")
 
             # set iscsi nodes to autostart
-            for disk in disks:
-                # devices used for root get started by the initrd
-                if root.dependsOn(disk):
-                    continue
-
-                node = self.getNode(disk.iscsi_name, disk.iscsi_address, disk.iscsi_port)
-                if node:
+            for node in self.nodes:
+                autostart = True
+                disks = self.getNodeDisks(node, anaconda.id.storage)
+                for disk in disks:
+                    # nodes used for root get started by the initrd
+                    if root.dependsOn(disk):
+                        autostart = False
+
+                if autostart:
                     node.setParameter("node.startup", "automatic")
 
             if not os.path.isdir(instPath + "/etc/iscsi"):
-- 
1.6.2.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux