New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ldap: add new option ldap_library_debug_level #5178
Conversation
| @@ -130,6 +130,7 @@ ldap_rfc2307_fallback_to_local_users = bool, None, false | |||
| ldap_min_id = int, None, false | |||
| ldap_max_id = int, None, false | |||
| ldap_pwdlockout_dn = str, None, false | |||
| ldap_library_debug_level = str, None, false | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why str and not int?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, sorry, typo, fixed.
|
(JFTR: I guess this relates to https://bugzilla.redhat.com/show_bug.cgi?id=1839972) An approach to debug messages from different libs, e.g. libldap vs libldb, feels a little bit inconsistent... I wonder if it would be better (simpler to use) to just rename |
|
I also think it is not very useful to have an ability to enable libldap logs totally independent of general sssd log level. Some combinations doesn't really have a lot of value, imo. |
With the new option ldap_library_debug_level the debug level for OpenLDAP's internal debugging can be set. If set the OpenLDAP debug messages will be written to the logs independent of the general debug_level.
|
Hi, I made the debug output independent of the general debug_level mainly based on the experience with libldb. Typically the debug output of libldb is not needed and make logs harder to read. So if it would be only about libldb a dedicated debug_level would work. But I think something like But I agree there are some drawbacks as well. E.g. new options are needed. Or it is not easy to just switch on all debugging, but here I think it is typically not needed, especially libldap debugging. bye, |
Right, agree. But having this output with Wouldn't it make sense to:
I was thinking about generalization of this option for all "foreign libs" in the form In general I worry how to do this change more user-friendly / useful. So far this feels like "yet another one knob only few developers will be aware of". Having said this, patch itself is functional and should work fine, of course. |
|
I just used this patch to debug something and it works as expected. The SSSD debug level is a bitmask and the idea behind it is that you can enable or disable specific messages. So we can certainly add SSSDDBG_EXTERNAL_LDAP or something and enable -1 ldap level if this is set. But I'm fine with the option as well, especially if you think that something else then -1 (enable all) is helpful. |
|
Hi, as I said I'd prefer to use a separate option for this because in more or less all cases this debug output is not needed and -1 is very verbose. So I think bye, |
Ok. |
|
Ack. |
Configure single domain and check "ldap_library_debug_level"
parameter.
It consists of three test cases:
1. Check ldap_library_debug_level option with config-check
2. Set ldap_library_debug_level to zero and check
corresponding logs
3. Set ldap_library_debug_level to two and check
corresponding logs
Verifies:
Issue: SSSD#5178
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207
Configure single domain and check "ldap_library_debug_level"
parameter.
It consists of three test cases:
1. Check ldap_library_debug_level option with config-check
2. Set ldap_library_debug_level to zero and check
corresponding logs
3. Set ldap_library_debug_level to two and check
corresponding logs
Verifies:
Issue: SSSD#5178
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207
Configure single domain and check "ldap_library_debug_level"
parameter.
It consists of three test cases:
1. Check ldap_library_debug_level option with config-check
2. Set ldap_library_debug_level to zero and check
corresponding logs
3. Set ldap_library_debug_level to two and check
corresponding logs
Verifies:
Issue: SSSD#5178
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207
Configure single domain and check "ldap_library_debug_level"
parameter.
It consists of three test cases:
1. Check ldap_library_debug_level option with config-check
2. Set ldap_library_debug_level to zero and check
corresponding logs
3. Set ldap_library_debug_level to two and check
corresponding logs
Verifies:
Issue: #5178
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207
Reviewed-by: Steeve Goveas <sgoveas@redhat.com>
Configure single domain and check "ldap_library_debug_level"
parameter.
It consists of three test cases:
1. Check ldap_library_debug_level option with config-check
2. Set ldap_library_debug_level to zero and check
corresponding logs
3. Set ldap_library_debug_level to two and check
corresponding logs
Verifies:
Issue: SSSD#5178
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207
Reviewed-by: Steeve Goveas <sgoveas@redhat.com>
Configure single domain and check "ldap_library_debug_level"
parameter.
It consists of three test cases:
1. Check ldap_library_debug_level option with config-check
2. Set ldap_library_debug_level to zero and check
corresponding logs
3. Set ldap_library_debug_level to two and check
corresponding logs
Verifies:
Issue: SSSD#5178
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207
Reviewed-by: Steeve Goveas <sgoveas@redhat.com>
With the new option ldap_library_debug_level the debug level for
OpenLDAP's internal debugging can be set. If set the OpenLDAP debug
messages will be written to the logs independent of the general
debug_level.