Replace all log_exception_info calls with log.info
Resolves: rhbz#2028391
This commit is contained in:
parent
0abc76d715
commit
25ddfe0e8f
@ -0,0 +1,53 @@
|
|||||||
|
From 23b7573557e69d9b4dccdd6d52e82b82d8dba115 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vojtech Trefny <vtrefny@redhat.com>
|
||||||
|
Date: Wed, 1 Dec 2021 16:28:15 +0100
|
||||||
|
Subject: [PATCH] iscsi: Replace all log_exception_info calls with log.info
|
||||||
|
|
||||||
|
We don't get any useful information from the exception, it's
|
||||||
|
always the same traceback from a failed DBus call and we only use
|
||||||
|
these when a called failed because firmware ISCSI is not supported.
|
||||||
|
The resulting log message also looks like a failure with the
|
||||||
|
traceback logged and not just as a debug information.
|
||||||
|
|
||||||
|
Resolves: rhbz#2028134
|
||||||
|
---
|
||||||
|
blivet/iscsi.py | 9 ++++-----
|
||||||
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/blivet/iscsi.py b/blivet/iscsi.py
|
||||||
|
index 5ee2082b..bc77ca62 100644
|
||||||
|
--- a/blivet/iscsi.py
|
||||||
|
+++ b/blivet/iscsi.py
|
||||||
|
@@ -22,7 +22,6 @@ from . import udev
|
||||||
|
from . import util
|
||||||
|
from .flags import flags
|
||||||
|
from .i18n import _
|
||||||
|
-from .storage_log import log_exception_info
|
||||||
|
from . import safe_dbus
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
@@ -277,8 +276,8 @@ class iSCSI(object):
|
||||||
|
'org.freedesktop.DBus.ObjectManager',
|
||||||
|
'GetManagedObjects',
|
||||||
|
None)[0]
|
||||||
|
- except safe_dbus.DBusCallError:
|
||||||
|
- log_exception_info(log.info, "iscsi: Failed to get active sessions.")
|
||||||
|
+ except safe_dbus.DBusCallError as e:
|
||||||
|
+ log.info("iscsi: Failed to get active sessions: %s", str(e))
|
||||||
|
return []
|
||||||
|
|
||||||
|
sessions = (obj for obj in objects.keys() if re.match(r'.*/iscsi/session[0-9]+$', obj))
|
||||||
|
@@ -302,8 +301,8 @@ class iSCSI(object):
|
||||||
|
args = GLib.Variant("(a{sv})", ([], ))
|
||||||
|
try:
|
||||||
|
found_nodes, _n_nodes = self._call_initiator_method("DiscoverFirmware", args)
|
||||||
|
- except safe_dbus.DBusCallError:
|
||||||
|
- log_exception_info(log.info, "iscsi: No IBFT info found.")
|
||||||
|
+ except safe_dbus.DBusCallError as e:
|
||||||
|
+ log.info("iscsi: No IBFT info found: %s", str(e))
|
||||||
|
# an exception here means there is no ibft firmware, just return
|
||||||
|
return
|
||||||
|
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -23,7 +23,7 @@ Version: 3.4.0
|
|||||||
|
|
||||||
#%%global prerelease .b2
|
#%%global prerelease .b2
|
||||||
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
|
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
|
||||||
Release: 10%{?prerelease}%{?dist}
|
Release: 11%{?prerelease}%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
%global realname blivet
|
%global realname blivet
|
||||||
@ -43,6 +43,7 @@ Patch9: 0011-Tell-LVM-to-ignore-the-new-devices-file-for-now.patch
|
|||||||
Patch10: 0012-Improve-error-message-printed-for-missing-dependecie.patch
|
Patch10: 0012-Improve-error-message-printed-for-missing-dependecie.patch
|
||||||
Patch11: 0013-Use-bigger-chunk-size-for-thinpools-bigger-than-15.8.patch
|
Patch11: 0013-Use-bigger-chunk-size-for-thinpools-bigger-than-15.8.patch
|
||||||
Patch12: 0014-LVM-devices-file-support.patch
|
Patch12: 0014-LVM-devices-file-support.patch
|
||||||
|
Patch13: 0015-iscsi-Replace-all-log_exception_info-calls-with-log.patch
|
||||||
|
|
||||||
# Versions of required components (done so we make sure the buildrequires
|
# Versions of required components (done so we make sure the buildrequires
|
||||||
# match the requires versions of things).
|
# match the requires versions of things).
|
||||||
@ -205,6 +206,10 @@ configuration.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 14 2021 Vojtech Trefny <vtrefny@redhat.com> - 3.4.0-11
|
||||||
|
- Replace all log_exception_info calls with log.info
|
||||||
|
Resolves: rhbz#2028391
|
||||||
|
|
||||||
* Thu Dec 09 2021 Vojtech Trefny <vtrefny@redhat.com> - 3.4.0-10
|
* Thu Dec 09 2021 Vojtech Trefny <vtrefny@redhat.com> - 3.4.0-10
|
||||||
- Use LVM devices file instead of filter regex
|
- Use LVM devices file instead of filter regex
|
||||||
Resolves: rhbz#1967212
|
Resolves: rhbz#1967212
|
||||||
|
Loading…
Reference in New Issue
Block a user