[SSSD] [PATCH] Update few debug messages

Lukas Slebodnik lslebodn at redhat.com
Tue Jul 14 11:21:22 UTC 2015


On (19/06/15 12:53), Pavel Reichl wrote:
>On 06/19/2015 10:46 AM, Lukas Slebodnik wrote:
>>On (19/06/15 10:37), Pavel Reichl wrote:
>>>On 06/18/2015 06:16 PM, Lukas Slebodnik wrote:
>>>>ehlo,
>>>>
>>>>I noticed the same noise in log files as user in ticker 2678.
>>>>It was a little bit related to the latest changes with setting
>>>>initgroups flag in the right time.
>>>>
>>>>LS
>>>>
>>>>
>>>Hello,
>>>the patch won't apply on current master. Does it depend on some patch which
>>>is being reviewed?
>>Yes,
>>It is related to "[PATCH] SDAP: Remove user from cache for missing user in
>>LDAP". I didn't send them together because this patch does not fix regression.
>>
>>LS
>OK thanks, the only nitpick I found is usage of strerror, I know that Michal
>has patch to change this globally but I think that we are in agreement to use
>sss_strerror in changed/new code anyway, right?
>>+                } else if (ret != ENOENT) {
>>                     DEBUG(SSSDBG_OP_FAILURE,
>>-                          "sysdb_search_object_by_uuid did not return a "
>>\
>>-                          "single result.\n");
>>+                          "sysdb_search_object_by_uuid failed or returned
>>"
>>+                          "more than one result [%d][%s].\n",
>>+                          ret, strerror(ret));
>
>Otherwise code LGTM and CI passed, but I assume that I can't ack before
>"[PATCH] SDAP: Remove user from cache for missing user in LDAP" gets pushed
>to master anyway.
>

Patch could not be applied on top of master due to conflict.

Updated patch is attached.

LS
-------------- next part --------------
>From 532b28d6af61f4137da5cbae3dff90265b1f4f1c Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Tue, 14 Jul 2015 13:16:39 +0200
Subject: [PATCH] Update few debug messages

It reduces a noise caused by canonicalization of non-existing user.

Resolves:
https://fedorahosted.org/sssd/ticket/2678
---
 src/db/sysdb_search.c        | 7 ++++---
 src/providers/ldap/ldap_id.c | 5 +++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/db/sysdb_search.c b/src/db/sysdb_search.c
index a8dcc9f8d6617be8e8fb82a1c6360c6df9726a37..c92474875a07059abff27e8d329a24187dde97a2 100644
--- a/src/db/sysdb_search.c
+++ b/src/db/sysdb_search.c
@@ -1613,10 +1613,11 @@ errno_t sysdb_get_real_name(TALLOC_CTX *mem_ctx,
                                                   &res);
                 if (ret == EOK && res->count == 1) {
                     msg = res->msgs[0];
-                } else {
+                } else if (ret != ENOENT) {
                     DEBUG(SSSDBG_OP_FAILURE,
-                          "sysdb_search_object_by_uuid did not return a " \
-                          "single result.\n");
+                          "sysdb_search_object_by_uuid failed or returned "
+                          "more than one result [%d][%s].\n",
+                          ret, strerror(ret));
                     ret = ENOENT;
                     goto done;
                 }
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c
index 3245e1b12a69483f961f01210d13654b1c7c5345..89fc9aac64c2f1cba8f6bf793aa6fd262aefcf58 100644
--- a/src/providers/ldap/ldap_id.c
+++ b/src/providers/ldap/ldap_id.c
@@ -1178,8 +1178,9 @@ static void groups_by_user_done(struct tevent_req *subreq)
         ret = sysdb_get_real_name(state, state->domain, state->name, &cname);
         if (ret != EOK) {
             cname = state->name;
-            DEBUG(SSSDBG_OP_FAILURE,
-                  "Failed to canonicalize name, using [%s].\n", cname);
+            DEBUG(SSSDBG_TRACE_INTERNAL,
+                  "Failed to canonicalize name, using [%s] [%d]: %s.\n",
+                  cname, ret, sss_strerror(ret));
         }
     }
 
-- 
2.4.3



More information about the sssd-devel mailing list