[rhel7-branch 2/2] Make logging less cluttering.

rvykydal installerbot-noreply at redhat.com
Wed Aug 12 13:25:17 UTC 2015


From: Radek Vykydal <rvykydal at redhat.com>

---
 blivet/fcoe.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/blivet/fcoe.py b/blivet/fcoe.py
index dc203f8..f1b72c8 100644
--- a/blivet/fcoe.py
+++ b/blivet/fcoe.py
@@ -123,7 +123,7 @@ def addSan(self, nic, dcb=False, auto_vlan=True):
                     ["lldptool", "-p"])
                 if not rc:
                     break
-                log.info("Waiting for lldpad to be ready")
+                timeout_msg = "waiting for lldpad to be ready"
                 timeout -= 1
                 time.sleep(1)
 
@@ -132,7 +132,7 @@ def addSan(self, nic, dcb=False, auto_vlan=True):
                     ["dcbtool", "sc", nic, "dcb", "on"])
                 if not rc:
                     break
-                log.info("Retrying to turn dcb on")
+                timeout_msg = "retrying to turn dcb on"
                 timeout -= 1
                 time.sleep(1)
 
@@ -141,7 +141,7 @@ def addSan(self, nic, dcb=False, auto_vlan=True):
                     ["dcbtool", "sc", nic, "pfc", "e:1", "a:1", "w:1"])
                 if not rc:
                     break
-                log.info("Retrying to set up dcb with pfc")
+                timeout_msg = "retrying to set up dcb with pfc"
                 timeout -= 1
                 time.sleep(1)
 
@@ -151,7 +151,7 @@ def addSan(self, nic, dcb=False, auto_vlan=True):
                 if not rc:
                     break
                 time.sleep(1)
-                log.info("Retrying to set up dcb for fcoe")
+                timeout_msg = "retrying to set up dcb for fcoe"
 
             time.sleep(1)
 
@@ -159,6 +159,8 @@ def addSan(self, nic, dcb=False, auto_vlan=True):
                 self.write_nic_fcoe_cfg(nic, dcb=dcb, auto_vlan=auto_vlan)
                 rc, out = util.run_program_and_capture_output(
                     ["systemctl", "restart", "fcoe.service"])
+            else:
+                log.info("Timed out when %s" % timeout_msg)
 
         else:
             dpath = os.readlink("/sys/class/net/%s/device/driver" % nic)


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/913a20387f69e9a62760f9a2c3a415a96006a275


More information about the anaconda-patches mailing list