summaryrefslogtreecommitdiffstats
path: root/iscsi.py
diff options
context:
space:
mode:
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,