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