URL: https://github.com/SSSD/sssd/pull/5788 Author: sumit-bose Title: #5788: debug: suppress backtrace if GetAccountDomain() is not supported Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5788/head:pr5788 git checkout pr5788
From 22a2fbffe5116ee6c29c4f339b012108293f9486 Mon Sep 17 00:00:00 2001 From: Sumit Bose <sb...@redhat.com> Date: Fri, 27 Aug 2021 11:04:04 +0200 Subject: [PATCH 1/2] debug: reduce logging of GetAccountDomain() in the frontends The return code ERR_GET_ACCT_DOM_NOT_SUPPORTED is an expected return code if the backend does not support the GetAccountDomain() request and there is no need to have a log message for this on the default log level or to trigger a backtrace in the logs in this case. For all other error a log message at the default log level make sense to indicate an issue in the backend but a backtrace in the frontend logs is not needed as well. --- src/responder/common/responder_get_domains.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/responder/common/responder_get_domains.c b/src/responder/common/responder_get_domains.c index 68ea7c5b5d..b60f11a4d6 100644 --- a/src/responder/common/responder_get_domains.c +++ b/src/responder/common/responder_get_domains.c @@ -795,8 +795,11 @@ static void sss_dp_get_account_domain_done(struct tevent_req *subreq) } if (state->dp_error != DP_ERR_OK) { - DEBUG(SSSDBG_OP_FAILURE, "Data Provider Error: %u, %u\n", - (unsigned int)state->dp_error, (unsigned int)state->error); + DEBUG(state->error == ERR_GET_ACCT_DOM_NOT_SUPPORTED ? SSSDBG_TRACE_INTERNAL + : SSSDBG_IMPORTANT_INFO, + "Data Provider Error: %u, %u [%s]\n", + (unsigned int)state->dp_error, (unsigned int)state->error, + sss_strerror(state->error)); tevent_req_error(req, state->error ? state->error : EIO); return; } From 218a403225b277a941575792f6dce5e61645488e Mon Sep 17 00:00:00 2001 From: Sumit Bose <sb...@redhat.com> Date: Mon, 30 Aug 2021 11:33:26 +0200 Subject: [PATCH 2/2] debug: suppress backtrace for backend errors Only log a message in the frontend without a backtrace if the backend returns an error. --- src/responder/common/cache_req/plugins/cache_req_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/responder/common/cache_req/plugins/cache_req_common.c b/src/responder/common/cache_req/plugins/cache_req_common.c index 6f4d27cb60..2591dd1b73 100644 --- a/src/responder/common/cache_req/plugins/cache_req_common.c +++ b/src/responder/common/cache_req/plugins/cache_req_common.c @@ -140,7 +140,7 @@ cache_req_common_process_dp_reply(struct cache_req *cr, } if (err_maj) { - CACHE_REQ_DEBUG(SSSDBG_OP_FAILURE, cr, + CACHE_REQ_DEBUG(SSSDBG_IMPORTANT_INFO, cr, "Data Provider Error: %u, %u, %s\n", (unsigned int)err_maj, (unsigned int)err_min, err_msg); CACHE_REQ_DEBUG(SSSDBG_TRACE_FUNC, cr,
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure