[PATCH blivet rhel7-branch] iscsi: improve logging of failed logins (#1114820)

Radek Vykydal rvykydal at redhat.com
Tue Dec 2 08:52:57 UTC 2014


Related: rhbz#1114820
---
 blivet/iscsi.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/blivet/iscsi.py b/blivet/iscsi.py
index cc557cb..c8c4e5d 100644
--- a/blivet/iscsi.py
+++ b/blivet/iscsi.py
@@ -161,8 +161,9 @@ class iscsi(object):
                     node.name, node.address, node.port, node.iface)
                 self.ibftNodes.append(node)
             except IOError as e:
-                log.error("Could not log into ibft iscsi target %s: %s",
-                          node.name, str(e))
+                log.error("iSCSI: could not log into ibft %s at %s:%s through %s: %s",
+                         node.name, node.address, node.port, node.iface,
+                         str(e))
 
         self.stabilize()
 
@@ -285,7 +286,8 @@ class iscsi(object):
             self.discovered_targets[(ipaddr, port)] = []
             for node in found_nodes:
                 self.discovered_targets[(ipaddr, port)].append([node, False])
-                log.debug("discovered iSCSI node: %s", node.name)
+                log.debug("discovered iSCSI node: %s, %s:%s, %s",
+                          node.name, node.address, node.port, node.iface)
 
         # only return the nodes we are not logged into yet
         return [node for (node, logged_in) in
@@ -317,7 +319,8 @@ class iscsi(object):
                 log.error("iSCSI: node not found among discovered")
         except (IOError, ValueError) as e:
             msg = str(e)
-            log.warning("iSCSI: could not log into %s: %s", node.name, msg)
+            log.warning("iSCSI: could not log into %s at %s:%s through %s: %s",
+                         node.name, node.address, node.port, node.iface, msg)
 
         return (rc, msg)
 
-- 
1.9.3



More information about the anaconda-patches mailing list