[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[f15-branch] iscsi: use the --target parameter from the iscsi kickstart command.
- From: Ales Kozumplik <akozumpl redhat com>
- To: anaconda-devel-list redhat com
- Subject: [f15-branch] iscsi: use the --target parameter from the iscsi kickstart command.
- Date: Wed, 9 Mar 2011 13:51:28 +0100
Also generate this parameter when writing out the kickstart.
Resolves: rhbz#676114
---
pyanaconda/kickstart.py | 8 ++++++--
pyanaconda/storage/iscsi.py | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index bc7b293..9486175 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -384,8 +384,12 @@ class Iscsi(commands.iscsi.F10_Iscsi):
def __init__(self, iscsi_obj, tg_data):
self.iscsi_obj = iscsi_obj
self.tg_data = tg_data
-
+
def login(self, node):
+ if self.tg_data.target and self.tg_data.target != node.name:
+ log.debug("kickstart: skipping logging to iscsi node '%s'" %
+ node.name)
+ return False
(rc, _) = self.iscsi_obj.log_into_node(
node, self.tg_data.user, self.tg_data.password,
self.tg_data.user_in, self.tg_data.password_in)
@@ -397,7 +401,7 @@ class Iscsi(commands.iscsi.F10_Iscsi):
try:
iscsi_obj = storage.iscsi.iscsi()
discovered_nodes = iscsi_obj.discover(
- tg.ipaddr, tg.port, tg.user, tg.password,
+ tg.ipaddr, tg.port, tg.user, tg.password,
tg.user_in, tg.password_in)
login = self.Login(iscsi_obj, tg)
logged_into_nodes = filter(login.login, discovered_nodes)
diff --git a/pyanaconda/storage/iscsi.py b/pyanaconda/storage/iscsi.py
index 378c5f3..61a4600 100644
--- a/pyanaconda/storage/iscsi.py
+++ b/pyanaconda/storage/iscsi.py
@@ -285,7 +285,8 @@ class iscsi(object):
return
f.write("iscsiname %s\n" %(self.initiator,))
for n in self.nodes:
- f.write("iscsi --ipaddr %s --port %s" %(n.address, n.port))
+ f.write("iscsi --ipaddr %s --port %s --target %s" %
+ (n.address, n.port, n.name))
auth = n.getAuth()
if auth:
f.write(" --user %s" % auth.username)
--
1.7.3.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]