|
|
ecf709 |
From b818bb3f27ce672df0a6cadf2fd90716d2a576dc Mon Sep 17 00:00:00 2001
|
|
|
ecf709 |
From: Justin Stephenson <jstephen@redhat.com>
|
|
|
ecf709 |
Date: Wed, 26 Apr 2017 15:45:33 -0400
|
|
|
ecf709 |
Subject: [PATCH 122/127] DP: Reduce Data Provider log level noise
|
|
|
ecf709 |
MIME-Version: 1.0
|
|
|
ecf709 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ecf709 |
Content-Transfer-Encoding: 8bit
|
|
|
ecf709 |
|
|
|
ecf709 |
Certain operations are not supported with certain providers
|
|
|
ecf709 |
causing informational Data Provider log messages to be logged as
|
|
|
ecf709 |
errors or failures. This patch lowers the log level to reduce overall
|
|
|
ecf709 |
log noise and ensure only critical log messages are logged when
|
|
|
ecf709 |
a low debug_level value is used.
|
|
|
ecf709 |
|
|
|
ecf709 |
Resolves:
|
|
|
ecf709 |
https://pagure.io/SSSD/sssd/issue/3287
|
|
|
ecf709 |
https://pagure.io/SSSD/sssd/issue/3278
|
|
|
ecf709 |
|
|
|
ecf709 |
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
ecf709 |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
ecf709 |
(cherry picked from commit e98d085b529e0ae5e07a717ce3b30f3943be0ee0)
|
|
|
ecf709 |
---
|
|
|
ecf709 |
src/providers/data_provider/dp_methods.c | 2 +-
|
|
|
ecf709 |
src/providers/data_provider/dp_targets.c | 2 +-
|
|
|
ecf709 |
src/responder/common/responder_dp.c | 13 +++++++++++--
|
|
|
ecf709 |
3 files changed, 13 insertions(+), 4 deletions(-)
|
|
|
ecf709 |
|
|
|
ecf709 |
diff --git a/src/providers/data_provider/dp_methods.c b/src/providers/data_provider/dp_methods.c
|
|
|
ecf709 |
index 498676d1bec2da300ca4b33f7110debcbf0aac00..9e49c5f5d65b869b3699fdc682a535e0111b6fd4 100644
|
|
|
ecf709 |
--- a/src/providers/data_provider/dp_methods.c
|
|
|
ecf709 |
+++ b/src/providers/data_provider/dp_methods.c
|
|
|
ecf709 |
@@ -109,7 +109,7 @@ errno_t dp_find_method(struct data_provider *provider,
|
|
|
ecf709 |
}
|
|
|
ecf709 |
|
|
|
ecf709 |
if (!dp_target_initialized(provider->targets, target)) {
|
|
|
ecf709 |
- DEBUG(SSSDBG_CRIT_FAILURE, "Target [%s] is not initialized\n",
|
|
|
ecf709 |
+ DEBUG(SSSDBG_CONF_SETTINGS, "Target [%s] is not initialized\n",
|
|
|
ecf709 |
dp_target_to_string(target));
|
|
|
ecf709 |
return ERR_MISSING_DP_TARGET;
|
|
|
ecf709 |
}
|
|
|
ecf709 |
diff --git a/src/providers/data_provider/dp_targets.c b/src/providers/data_provider/dp_targets.c
|
|
|
ecf709 |
index 26d20a8ef79b80d56df76d7a73ec8e63d001ecbc..e2a45bbac969ca7b9b13729f26b8cded8ab7eebc 100644
|
|
|
ecf709 |
--- a/src/providers/data_provider/dp_targets.c
|
|
|
ecf709 |
+++ b/src/providers/data_provider/dp_targets.c
|
|
|
ecf709 |
@@ -284,7 +284,7 @@ static errno_t dp_target_init(struct be_ctx *be_ctx,
|
|
|
ecf709 |
if (!target->explicitly_configured && (ret == ELIBBAD || ret == ENOTSUP)) {
|
|
|
ecf709 |
/* Target not found but it wasn't explicitly
|
|
|
ecf709 |
* configured so we shall just continue. */
|
|
|
ecf709 |
- DEBUG(SSSDBG_CRIT_FAILURE, "Target [%s] is not supported by "
|
|
|
ecf709 |
+ DEBUG(SSSDBG_CONF_SETTINGS, "Target [%s] is not supported by "
|
|
|
ecf709 |
"module [%s].\n", target->name, target->module_name);
|
|
|
ecf709 |
ret = EOK;
|
|
|
ecf709 |
goto done;
|
|
|
ecf709 |
diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c
|
|
|
ecf709 |
index 080f70fd5945ffd234e0ef226d8139df071c4752..a75a611960801f5f5bdc95f00aea9ab921e8e293 100644
|
|
|
ecf709 |
--- a/src/responder/common/responder_dp.c
|
|
|
ecf709 |
+++ b/src/responder/common/responder_dp.c
|
|
|
ecf709 |
@@ -218,8 +218,17 @@ static int sss_dp_get_reply(DBusPendingCall *pending,
|
|
|
ecf709 |
err = ETIME;
|
|
|
ecf709 |
goto done;
|
|
|
ecf709 |
}
|
|
|
ecf709 |
- DEBUG(SSSDBG_FATAL_FAILURE,"The Data Provider returned an error [%s]\n",
|
|
|
ecf709 |
- dbus_message_get_error_name(reply));
|
|
|
ecf709 |
+
|
|
|
ecf709 |
+ if (strcmp(dbus_message_get_error_name(reply),
|
|
|
ecf709 |
+ SBUS_ERROR_DP_NOTSUP) == 0) {
|
|
|
ecf709 |
+ DEBUG(SSSDBG_CONF_SETTINGS,
|
|
|
ecf709 |
+ "Data Provider does not support this operation.\n");
|
|
|
ecf709 |
+ } else {
|
|
|
ecf709 |
+ DEBUG(SSSDBG_FATAL_FAILURE,
|
|
|
ecf709 |
+ "The Data Provider returned an error [%s]\n",
|
|
|
ecf709 |
+ dbus_message_get_error_name(reply));
|
|
|
ecf709 |
+ }
|
|
|
ecf709 |
+
|
|
|
ecf709 |
/* Falling through to default intentionally*/
|
|
|
ecf709 |
SSS_ATTRIBUTE_FALLTHROUGH;
|
|
|
ecf709 |
default:
|
|
|
ecf709 |
--
|
|
|
ecf709 |
2.9.3
|
|
|
ecf709 |
|