summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2008-03-25 22:45:56 +0100
committerMartin Sivak <msivak@redhat.com>2008-03-25 22:47:57 +0100
commitc0beca8cfd3af9a38dee89fc2ffb83bb5b2b6e55 (patch)
treeca1b6ce939b572daebf20eac5c885b36c8ce0c6f
parent7e4430e2f8edb9af1c982a22dd357edb755fe994 (diff)
downloadanaconda-c0beca8cfd3af9a38dee89fc2ffb83bb5b2b6e55.tar.gz
anaconda-c0beca8cfd3af9a38dee89fc2ffb83bb5b2b6e55.tar.xz
anaconda-c0beca8cfd3af9a38dee89fc2ffb83bb5b2b6e55.zip
Do not try to initialize iSCSI drive, when the portal cannot be detected (#435173)
-rw-r--r--iscsi.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/iscsi.py b/iscsi.py
index d23f1980b..bcb54df12 100644
--- a/iscsi.py
+++ b/iscsi.py
@@ -114,6 +114,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" ]
@@ -122,6 +126,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,