[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 2/8] Only set iscsi nodes to autostart when none of the LUN's contain /
- From: Hans de Goede <hdegoede redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Cc:
- Subject: [PATCH 2/8] Only set iscsi nodes to autostart when none of the LUN's contain /
- Date: Fri, 31 Jul 2009 19:22:58 +0200
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]