summaryrefslogtreecommitdiffstats
path: root/iscsi.py
diff options
context:
space:
mode:
authorHans de Goede <hans@localhost.localdomain>2008-09-15 10:15:10 +0200
committerHans de Goede <hans@localhost.localdomain>2008-09-15 10:15:10 +0200
commitfe734215fe548c8aed06b91028d3f1f8876a2300 (patch)
tree4b23e574d729f9c17724ff7716d3fe7213cc1ac0 /iscsi.py
parent8b6eaad0f64ee5be893966a9b8be194f0045ad0b (diff)
downloadanaconda-fe734215fe548c8aed06b91028d3f1f8876a2300.tar.gz
anaconda-fe734215fe548c8aed06b91028d3f1f8876a2300.tar.xz
anaconda-fe734215fe548c8aed06b91028d3f1f8876a2300.zip
Do not try to initialize iSCSI, when no portal (#435173)
Do not try to initialize iSCSI drive, when the portal cannot be detected (#435173). Forward port of rhel-5 patch from msivak, commit-id: c0beca8cfd3af9a38dee89fc2ffb83bb5b2b6e55
Diffstat (limited to 'iscsi.py')
-rw-r--r--iscsi.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/iscsi.py b/iscsi.py
index a00a43dcf..b9f28516e 100644
--- a/iscsi.py
+++ b/iscsi.py
@@ -123,6 +123,10 @@ class iscsiTarget:
return True
def startNode(self, node):
+ if node is None or self.portal is None:
+ log.warn("unable to find portal information")
+ return
+
argv = [ "-m", "node", "-T", node, "-p", self.portal,
"-o", "update", "-n", "node.conn[0].startup",
"-v", "automatic" ]
@@ -131,6 +135,10 @@ class iscsiTarget:
stdout = "/dev/tty5", stderr="/dev/tty5")
def loginToNode(self, node):
+ if node is None or self.portal is None:
+ log.warn("unable to find portal information")
+ return
+
argv = [ "-m", "node", "-T", node, "-p", self.portal, "--login" ]
log.debug("iscsiadm %s" %(string.join(argv),))
rc = iutil.execWithRedirect(ISCSIADM, argv,