Skip to content

Tests: Housekeeping and Clean Sweep of Sevice/Logging suite#7891

Closed
jakub-vavra-cz wants to merge 1 commit into
SSSD:masterfrom
jakub-vavra-cz:logging
Closed

Tests: Housekeeping and Clean Sweep of Sevice/Logging suite#7891
jakub-vavra-cz wants to merge 1 commit into
SSSD:masterfrom
jakub-vavra-cz:logging

Conversation

@jakub-vavra-cz

Copy link
Copy Markdown
Contributor

No description provided.

@jakub-vavra-cz

Copy link
Copy Markdown
Contributor Author

I am not sure why the test is failing again. It was running fine when executed locally.

@jakub-vavra-cz
jakub-vavra-cz force-pushed the logging branch 2 times, most recently from d2f45ae to c5779e7 Compare March 26, 2025 13:52

@danlavu danlavu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions, nitpicks, but it's great, thank you!

Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
@alexey-tikhonov

alexey-tikhonov commented Mar 26, 2025

Copy link
Copy Markdown
Member

This uncovers following things that likely need to be fixed in the code:

(1) test_logging__default_settings_does_not_log_user_logins (ipa)

[be[test]] [ipa_subdomains_refresh_passkey_done] (0x3f7c0): [RID#1] Passkey feature is not configured on IPA server
[be[test]] [ipa_domain_resolution_order_done] (0x3f7c0): [RID#1] Failed to get the domains' resolution order configuration from the server [22]: Invalid argument
[be[test]] [ipa_subdomains_handler_done] (0x0020): [RID#1] Unable to refresh subdomains [22]: Invalid argument

(2) test_logging__default_settings_does_not_log_user_logins (ldap)

[ssh] [cache_req_common_process_dp_reply] (0x3f7c0): [CID#1] CR #0: Data Provider Error: 3, 22, Invalid argument

(3) test_logging__default_settings_does_not_log_user_logins (samba) (and the same with 'proxy')

[ssh] [cache_req_common_process_dp_reply] (0x3f7c0): [CID#1] CR #0: Could not get account info [1432158215]: DP target is not configured

Most probably all fixes will be decrease log level, but to be confirmed.

@jakub-vavra-cz

Copy link
Copy Markdown
Contributor Author

This uncovers following things that likely need to be fixed in the code:

(1) test_logging__default_settings_does_not_log_user_logins (ipa)

    < (2025-03-26 14:43:29): [be[test]] [ipa_subdomains_refresh_passkey_done] (0x3f7c0): [RID#1] Passkey feature is not configured on IPA server
    < (2025-03-26 14:43:29): [be[test]] [ipa_domain_resolution_order_done] (0x3f7c0): [RID#1] Failed to get the domains' resolution order configuration from the server [22]: Invalid argument
    < (2025-03-26 14:43:29): [be[test]] [ipa_subdomains_handler_done] (0x0020): [RID#1] Unable to refresh subdomains [22]: Invalid argument

(2) test_logging__default_settings_does_not_log_user_logins (ldap)

    < (2025-03-26 15:17:43): [ssh] [cache_req_common_process_dp_reply] (0x3f7c0): [CID#1] CR #0: Data Provider Error: 3, 22, Invalid argument

(3) test_logging__default_settings_does_not_log_user_logins (samba) (and the same with 'proxy')

    < (2025-03-26 15:43:21): [ssh] [cache_req_common_process_dp_reply] (0x3f7c0): [CID#1] CR #0: Could not get account info [1432158215]: DP target is not configured

Most probably all fixes will be decrease log level, but to be confirmed.

For ipa this is the config:

[sssd]
services = nss, pam, ssh
domains = test

[domain/test]
ipa_domain = ipa.test
id_provider = ipa
access_provider = ipa
ipa_server = master.ipa.test
dyndns_update = False
fallback_homedir = /home/%%u

@jakub-vavra-cz

jakub-vavra-cz commented Apr 11, 2025

Copy link
Copy Markdown
Contributor Author

@jakub-vavra-cz, could you please rebase?

rebased & pushed @alexey-tikhonov .

Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py Outdated
Comment thread src/tests/system/tests/test_logging.py
@alexey-tikhonov

Copy link
Copy Markdown
Member

(1) test_logging__default_settings_does_not_log_user_logins (ipa)

[be[test]] [ipa_subdomains_refresh_passkey_done] (0x3f7c0): [RID#1] Passkey feature is not configured on IPA server
[be[test]] [ipa_domain_resolution_order_done] (0x3f7c0): [RID#1] Failed to get the domains' resolution order configuration from the server [22]: Invalid argument
[be[test]] [ipa_subdomains_handler_done] (0x0020): [RID#1] Unable to refresh subdomains [22]: Invalid argument

@justin-stephenson , do you remember the reason why 2 messages above are logged as SSSDBG_IMPORTANT_INFO? (fa326be)

@alexey-tikhonov

Copy link
Copy Markdown
Member

(2) test_logging__default_settings_does_not_log_user_logins (ldap)

[ssh] [cache_req_common_process_dp_reply] (0x3f7c0): [CID#1] CR #0: Data Provider Error: 3, 22, Invalid argument

(3) test_logging__default_settings_does_not_log_user_logins (samba) (and the same with 'proxy')

[ssh] [cache_req_common_process_dp_reply] (0x3f7c0): [CID#1] CR #0: Could not get account info [1432158215]: DP target is not configured

@jakub-vavra-cz, could you please run those 2 tests with 'debug_level = 9' in the '[ssh]' and domain sections of sssd.conf and send me logs?

@justin-stephenson

Copy link
Copy Markdown
Contributor

(1) test_logging__default_settings_does_not_log_user_logins (ipa)

[be[test]] [ipa_subdomains_refresh_passkey_done] (0x3f7c0): [RID#1] Passkey feature is not configured on IPA server
[be[test]] [ipa_domain_resolution_order_done] (0x3f7c0): [RID#1] Failed to get the domains' resolution order configuration from the server [22]: Invalid argument
[be[test]] [ipa_subdomains_handler_done] (0x0020): [RID#1] Unable to refresh subdomains [22]: Invalid argument

@justin-stephenson , do you remember the reason why 2 messages above are logged as SSSDBG_IMPORTANT_INFO? (fa326be)

I'm afraid I don't remember. Would SSSDBG_MINOR_FAILURE be more appropriate? Feel free to adjust as needed.

@alexey-tikhonov

Copy link
Copy Markdown
Member

(1) test_logging__default_settings_does_not_log_user_logins (ipa)

[be[test]] [ipa_subdomains_refresh_passkey_done] (0x3f7c0): [RID#1] Passkey feature is not configured on IPA server
[be[test]] [ipa_domain_resolution_order_done] (0x3f7c0): [RID#1] Failed to get the domains' resolution order configuration from the server [22]: Invalid argument
[be[test]] [ipa_subdomains_handler_done] (0x0020): [RID#1] Unable to refresh subdomains [22]: Invalid argument

@justin-stephenson , do you remember the reason why 2 messages above are logged as SSSDBG_IMPORTANT_INFO? (fa326be)

I'm afraid I don't remember. Would SSSDBG_MINOR_FAILURE be more appropriate? Feel free to adjust as needed.

#7928

@alexey-tikhonov

Copy link
Copy Markdown
Member

Please rebase on the top of merged #7928

@alexey-tikhonov

Copy link
Copy Markdown
Member

@jakub-vavra-cz, ping:

Please rebase on the top of merged #7928

and #7891 (comment)

Merged tests for sssd offline message in logs and syslog.
Split backend offline(unreachable) and dns resolution error scenario.
Check that user login does not generate logs on default debug level
extended to all providers. Added link to debug level documentation.
Dropped references to (now-irrelevant) bugzillas in rewritten tests.
@jakub-vavra-cz

Copy link
Copy Markdown
Contributor Author

@jakub-vavra-cz, ping:

Please rebase on the top of merged #7928

and #7891 (comment)
@alexey-tikhonov rebased onto master

@alexey-tikhonov

alexey-tikhonov commented May 13, 2025

Copy link
Copy Markdown
Member

Looks like there are 3 issues:

(1) man page doesn't mention that 'ldap' is supported

(2) imo, it's wrong that ldap-provider returns 'Invalid argument' for 'localhost'

(3) wrt 'DP target is not configured' seen with a default debug level - I'm not so sure.
On the one hand, if somebody explicitly configures 'ssh' in 'services' list it's reasonable to expect that configured domain supports this service and to warn if it doesn't.
On the other hand, in theory there maybe multiple domains configured, with only some of them supporting 'hostid' lookups. In this setup it is expected that other domains will fail this lookup and warning isn't needed.

(2) & (3) needs to be fixed before merging this PR to avoid having yet another one always failing test.

Comment thread src/tests/system/tests/test_logging.py
@shridhargadekar

Copy link
Copy Markdown
Contributor

LGTM, Apart from above added comments from Alexey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants