TOOLS: noisy debug messages when config.ldb does not exist#8513
TOOLS: noisy debug messages when config.ldb does not exist#8513scabrero wants to merge 1 commit intoSSSD:masterfrom
Conversation
If sss_tool_confdb_init() fails because config.ldb does not exist yet, it will print at level 0: [sss_cache] [sss_tool_confdb_init] (0x0010): Can't access '/var/lib/sss/db/config.ldb', probably SSSD isn't configured Can't find configuration db, was SSSD configured and run? This is too noisy. For example, if shadow is built with sssd support, adding a new user will output these messages because useradd will call sss_cache to invalidate the user cache. Log with SSSDBG_OP_FAILURE instead of SSSDBG_CRIT_FAILURE. Signed-off-by: Samuel Cabrero <scabrero@suse.com>
There was a problem hiding this comment.
Code Review
This pull request addresses noisy debug messages that occur when config.ldb does not exist. The changes involve lowering the log level for this condition in src/tools/common/sss_tools.c from SSSDBG_FATAL_FAILURE to SSSDBG_OP_FAILURE, and in src/tools/sss_cache.c from an unconditional ERROR to a conditional DEBUG message with SSSDBG_OP_FAILURE. These modifications will prevent messages from being printed to stderr by default when tools like sss_cache are run on a system where SSSD is not yet configured, which is the intended behavior.
|
Hi @scabrero,
This shouldn't be a case on any reasonably modern system. Since SSSD dropped "files provider" there is no point to build SSSD support in shadow-utils. Moreover, if this support is built, it causes much more harm than spam in logs... |
right, should I target sssd-2-10 branch? It is deprecated but still available under |
Would this have a practical value for you? |
Mainly to avoid downstream patches but if no new 2.10.x release is planned it doesn't make much sense. |
If sss_tool_confdb_init() fails because config.ldb does not exist yet, it will print at level 0:
[sss_cache] [sss_tool_confdb_init] (0x0010): Can't access '/var/lib/sss/db/config.ldb', probably SSSD isn't configured
Can't find configuration db, was SSSD configured and run?
This is too noisy. For example, if shadow is built with sssd support, adding a new user will output these messages because useradd will call sss_cache to invalidate the user cache.
Log with SSSDBG_OP_FAILURE instead of SSSDBG_CRIT_FAILURE.