|
|
8b365e |
From b938e224c41021c19775d8675dc4337f1e10d4e3 Mon Sep 17 00:00:00 2001
|
|
|
8b365e |
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
|
8b365e |
Date: Wed, 1 Dec 2021 16:28:15 +0100
|
|
|
8b365e |
Subject: [PATCH] iscsi: Replace all log_exception_info calls with log.info
|
|
|
8b365e |
|
|
|
8b365e |
We don't get any useful information from the exception, it's
|
|
|
8b365e |
always the same traceback from a failed DBus call and we only use
|
|
|
8b365e |
these when a called failed because firmware ISCSI is not supported.
|
|
|
8b365e |
The resulting log message also looks like a failure with the
|
|
|
8b365e |
traceback logged and not just as a debug information.
|
|
|
8b365e |
|
|
|
8b365e |
Resolves: rhbz#2028134
|
|
|
8b365e |
---
|
|
|
8b365e |
blivet/iscsi.py | 9 ++++-----
|
|
|
8b365e |
1 file changed, 4 insertions(+), 5 deletions(-)
|
|
|
8b365e |
|
|
|
8b365e |
diff --git a/blivet/iscsi.py b/blivet/iscsi.py
|
|
|
8b365e |
index 5ee2082b..bc77ca62 100644
|
|
|
8b365e |
--- a/blivet/iscsi.py
|
|
|
8b365e |
+++ b/blivet/iscsi.py
|
|
|
8b365e |
@@ -22,7 +22,6 @@ from . import udev
|
|
|
8b365e |
from . import util
|
|
|
8b365e |
from .flags import flags
|
|
|
8b365e |
from .i18n import _
|
|
|
8b365e |
-from .storage_log import log_exception_info
|
|
|
8b365e |
from . import safe_dbus
|
|
|
8b365e |
import os
|
|
|
8b365e |
import re
|
|
|
8b365e |
@@ -277,8 +276,8 @@ class iSCSI(object):
|
|
|
8b365e |
'org.freedesktop.DBus.ObjectManager',
|
|
|
8b365e |
'GetManagedObjects',
|
|
|
8b365e |
None)[0]
|
|
|
8b365e |
- except safe_dbus.DBusCallError:
|
|
|
8b365e |
- log_exception_info(log.info, "iscsi: Failed to get active sessions.")
|
|
|
8b365e |
+ except safe_dbus.DBusCallError as e:
|
|
|
8b365e |
+ log.info("iscsi: Failed to get active sessions: %s", str(e))
|
|
|
8b365e |
return []
|
|
|
8b365e |
|
|
|
8b365e |
sessions = (obj for obj in objects.keys() if re.match(r'.*/iscsi/session[0-9]+$', obj))
|
|
|
8b365e |
@@ -302,8 +301,8 @@ class iSCSI(object):
|
|
|
8b365e |
args = GLib.Variant("(a{sv})", ([], ))
|
|
|
8b365e |
try:
|
|
|
8b365e |
found_nodes, _n_nodes = self._call_initiator_method("DiscoverFirmware", args)
|
|
|
8b365e |
- except safe_dbus.DBusCallError:
|
|
|
8b365e |
- log_exception_info(log.info, "iscsi: No IBFT info found.")
|
|
|
8b365e |
+ except safe_dbus.DBusCallError as e:
|
|
|
8b365e |
+ log.info("iscsi: No IBFT info found: %s", str(e))
|
|
|
8b365e |
# an exception here means there is no ibft firmware, just return
|
|
|
8b365e |
return
|
|
|
8b365e |
|
|
|
8b365e |
--
|
|
|
8b365e |
2.31.1
|
|
|
8b365e |
|