URL: https://github.com/SSSD/sssd/pull/5788 Author: sumit-bose Title: #5788: debug: suppress backtrace if GetAccountDomain() is not supported Action: opened
PR body: """ 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 trigger a backtrace in the logs in this case. """ 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 d430b028f6c79c33ddc60ebb77aba894708360d7 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: suppress backtrace if GetAccountDomain() is not supported 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 trigger a backtrace in the logs in this case. --- 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..1b2797c4d4 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_OP_FAILURE, + "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 c56769c45bf94ad50a8ee307e8dcc7d8be4e56d6 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: frontend backtrace for backend error? Do we need a backtrace in the frontend if the backend returns an error? --- src/responder/common/cache_req/plugins/cache_req_common.c | 2 ++ 1 file changed, 2 insertions(+) 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..b4fc07a308 100644 --- a/src/responder/common/cache_req/plugins/cache_req_common.c +++ b/src/responder/common/cache_req/plugins/cache_req_common.c @@ -140,6 +140,8 @@ cache_req_common_process_dp_reply(struct cache_req *cr, } if (err_maj) { + /* does a backtrace make sense here or would the error message + * sufficient? */ CACHE_REQ_DEBUG(SSSDBG_OP_FAILURE, cr, "Data Provider Error: %u, %u, %s\n", (unsigned int)err_maj, (unsigned int)err_min, err_msg);
_______________________________________________ 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