[SSSD] [sssd PR#5937][comment] [WIP] Another attempt to resolve #5134

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5937
Title: #5937: [WIP] Another attempt to resolve #5134

alexey-tikhonov commented:
"""
I did actual testing and conclusions are:
 - I correctly identified the bottleneck: 
https://github.com/SSSD/sssd/blob/4897c28741112b547a69feb7c887764c64cc9540/src/providers/ldap/sdap_async_nested_groups.c#L2355
 - my patch(-es) doesn't resolve the issue because by the moment `Received 
4 dereference results` `members->num_values` is already 4 (i.e. all 
those members are already known)
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5937#issuecomment-1006932032
___
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


[SSSD] [sssd PR#5943][synchronized] Tests: Add a test for bz1859315 - sssd does not use kerberos port that is set

2022-01-06 Thread jakub-vavra-cz
   URL: https://github.com/SSSD/sssd/pull/5943
Author: jakub-vavra-cz
 Title: #5943: Tests: Add a test for bz1859315 - sssd does not use kerberos 
port that is set
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5943/head:pr5943
git checkout pr5943
From c46bf478d1d4b7edd5b26be5f6739beca75c420d Mon Sep 17 00:00:00 2001
From: Jakub Vavra 
Date: Thu, 6 Jan 2022 08:56:39 +0100
Subject: [PATCH] Tests: Add a test for bz1859315 - sssd does not use kerberos
 port that is set.

Verifies: SSSD-2827
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1859315
---
 .../multihost/ad/test_adparameters_ported.py  | 88 +++
 1 file changed, 88 insertions(+)

diff --git a/src/tests/multihost/ad/test_adparameters_ported.py b/src/tests/multihost/ad/test_adparameters_ported.py
index 4048c27704..895e133bf4 100644
--- a/src/tests/multihost/ad/test_adparameters_ported.py
+++ b/src/tests/multihost/ad/test_adparameters_ported.py
@@ -14,6 +14,8 @@
 from sssd.testlib.common.utils import sssdTools
 from sssd.testlib.common.utils import SSSDException
 from sssd.testlib.common.utils import ADOperations
+from sssd.testlib.common.expect import pexpect_ssh
+from sssd.testlib.common.exceptions import SSHLoginException
 
 
 @pytest.fixture(scope="function", name="create_plain_aduser_group")
@@ -3535,3 +3537,89 @@ def test_0042_ad_parameters_nonroot_user_sssd(
 assert usr_cmd.returncode == 0, f"User {aduser} was not found."
 assert grp_cmd.returncode == 0, f"Group {adgroup} was not found."
 assert ps_cmd.returncode == 0, "Sssd is not running under user!"
+
+@staticmethod
+@pytest.mark.tier1_2
+def test_0043_sssd_not_using_given_krb_port(
+multihost, adjoin, create_aduser_group):
+"""
+:title: IDM-SSSD-TC: SSSD does not use kerberos port that is set.
+:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1859315
+:id: 558f692b-01c5-46f4-ad39-6b190dd7c017
+:steps:
+  1. Start SSSD with alternate port in config
+  2. Call 'kinit username@domain'
+  3. Call 'ssh -l username@domain localhost' and check sssd logs
+:expectedresults:
+  1. SSSD should start
+  2. Should succeed
+  3. Logs contain info about right port being used
+ Logs do not contain wrong (default) port being used
+"""
+
+adjoin(membersw='adcli')
+ad_realm = multihost.ad[0].domainname.upper()
+
+# Create AD user and group
+(aduser, _) = create_aduser_group
+
+# Configure sssd
+client = sssdTools(multihost.client[0], multihost.ad[0])
+client.backup_sssd_conf()
+
+dom_section = f'domain/{client.get_domain_section_name()}'
+sssd_params = {
+'ad_domain': multihost.ad[0].domainname,
+'debug_level': '0x4000',
+'use_fully_qualified_names': 'True',
+'cache_credentials': 'True',
+'krb5_store_password_if_offline': 'True',
+'krb5_server': f'{multihost.ad[0].hostname}:',
+'id_provider': 'ad',
+'auth_provider': 'krb5',
+'access_provider': 'ad',
+'krb5_realm': ad_realm,
+}
+client.sssd_conf(dom_section, sssd_params)
+
+# Clear cache and restart SSSD
+client.clear_sssd_cache()
+
+# Debug
+multihost.client[0].run_command(
+'cat /etc/sssd/sssd.conf', raiseonerr=False)
+
+# Run kinit for the user
+kinit_cmd = multihost.client[0].run_command(
+f'kinit {aduser}@{ad_realm}', stdin_text='Secret123',
+raiseonerr=False)
+
+client_ssh = pexpect_ssh(multihost.client[0].sys_hostname,
+ f'{aduser}@{ad_realm}', 'Secret123',
+ debug=False)
+try:
+client_ssh.login(login_timeout=30, sync_multiplier=5,
+ auto_prompt_reset=False)
+except SSHLoginException:
+pass
+else:
+client_ssh.logout()
+
+# Download all logs
+log_str = multihost.client[0].run_command(
+"cat /var/log/sssd/*.log").stdout_text
+
+# TEARDOWN
+client.restore_sssd_conf()
+client.clear_sssd_cache()
+
+# Evaluate test results
+assert f"Option krb5_server has value " \
+   f"{multihost.ad[0].sys_hostname}:" in log_str
+assert f"Sending initial UDP request to dgram " \
+   f"{multihost.ad[0].ip}:88" not in log_str
+assert f"Initiating TCP connection to stream {multihost.ad[0].ip}:88" \
+   not in log_str
+assert f"Initiating TCP connection to stream " \
+   f"{multihost.ad[0].ip}:" in log_str
+assert kinit_cmd.returncode == 0, "kinit failed."
___
sssd-devel 

[SSSD] [sssd PR#5943][+Tests] Tests: Add a test for bz1859315 - sssd does not use kerberos port that is set

2022-01-06 Thread jakub-vavra-cz
  URL: https://github.com/SSSD/sssd/pull/5943
Title: #5943: Tests: Add a test for bz1859315 - sssd does not use kerberos port 
that is set

Label: +Tests
___
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


[SSSD] [sssd PR#5943][opened] Tests: Add a test for bz1859315 - sssd does not use kerberos port that is set

2022-01-06 Thread jakub-vavra-cz
   URL: https://github.com/SSSD/sssd/pull/5943
Author: jakub-vavra-cz
 Title: #5943: Tests: Add a test for bz1859315 - sssd does not use kerberos 
port that is set
Action: opened

PR body:
"""
Verifies: SSSD-2827
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1859315
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5943/head:pr5943
git checkout pr5943
From 237c52105b87c7c8e2f6f2d67f514a9cfb456177 Mon Sep 17 00:00:00 2001
From: Jakub Vavra 
Date: Thu, 6 Jan 2022 08:56:39 +0100
Subject: [PATCH] Tests: Add a test for bz1859315 - sssd does not use kerberos
 port that is set.

Verifies: SSSD-2827
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1859315
---
 .../multihost/ad/test_adparameters_ported.py  | 87 +++
 1 file changed, 87 insertions(+)

diff --git a/src/tests/multihost/ad/test_adparameters_ported.py b/src/tests/multihost/ad/test_adparameters_ported.py
index 4048c27704..4c5a0c745e 100644
--- a/src/tests/multihost/ad/test_adparameters_ported.py
+++ b/src/tests/multihost/ad/test_adparameters_ported.py
@@ -14,6 +14,8 @@
 from sssd.testlib.common.utils import sssdTools
 from sssd.testlib.common.utils import SSSDException
 from sssd.testlib.common.utils import ADOperations
+from sssd.testlib.common.expect import pexpect_ssh
+from sssd.testlib.common.exceptions import SSHLoginException
 
 
 @pytest.fixture(scope="function", name="create_plain_aduser_group")
@@ -3535,3 +3537,88 @@ def test_0042_ad_parameters_nonroot_user_sssd(
 assert usr_cmd.returncode == 0, f"User {aduser} was not found."
 assert grp_cmd.returncode == 0, f"Group {adgroup} was not found."
 assert ps_cmd.returncode == 0, "Sssd is not running under user!"
+
+@staticmethod
+@pytest.mark.tier1_2
+def test_0043_sssd_not_using_given_krb_port(
+multihost, adjoin, create_aduser_group):
+"""
+:title: IDM-SSSD-TC: SSSD does not use kerberos port that is set.
+:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1859315
+:id: 558f692b-01c5-46f4-ad39-6b190dd7c017
+:steps:
+  1. Start SSSD with alternate port in config
+  2. Call 'kinit username@domain'
+  3. Call 'ssh -l username@domain localhost' and check sssd logs
+:expectedresults:
+  1. SSSD should start
+  2. Should succeed
+  3. Logs contain info about right port being used
+ Logs do not contain wrong (default) port being used
+"""
+
+adjoin(membersw='adcli')
+ad_realm = multihost.ad[0].domainname.upper()
+
+# Create AD user and group
+(aduser, _) = create_aduser_group
+
+# Configure sssd
+client = sssdTools(multihost.client[0], multihost.ad[0])
+client.backup_sssd_conf()
+
+dom_section = f'domain/{client.get_domain_section_name()}'
+sssd_params = {
+'ad_domain': multihost.ad[0].domainname,
+'debug_level': '0x4000',
+'use_fully_qualified_names': 'True',
+'cache_credentials': 'True',
+'krb5_store_password_if_offline': 'True',
+'krb5_server': f'{multihost.ad[0].hostname}:',
+'id_provider': 'ad',
+'auth_provider': 'krb5',
+'access_provider': 'ad',
+'krb5_realm': ad_realm,
+}
+client.sssd_conf(dom_section, sssd_params)
+
+# Clear cache and restart SSSD
+client.clear_sssd_cache()
+
+# Debug
+multihost.client[0].run_command(
+'cat /etc/sssd/sssd.conf', raiseonerr=False)
+
+# Run kinit for the user
+kinit_cmd = multihost.client[0].run_command(
+f'kinit {aduser}@{ad_realm}', stdin_text='Secret123',
+raiseonerr=False)
+
+client_ssh = pexpect_ssh(multihost.client[0].sys_hostname,
+ f'{aduser}@{ad_realm}', 'Secret123', debug=False)
+try:
+client_ssh.login(login_timeout=30, sync_multiplier=5,
+ auto_prompt_reset=False)
+except SSHLoginException:
+pass
+else:
+client_ssh.logout()
+
+# Download all logs
+log_str = multihost.client[0].run_command(
+"cat /var/log/sssd/*.log").stdout_text
+
+# TEARDOWN
+client.restore_sssd_conf()
+client.clear_sssd_cache()
+
+# Evaluate test results
+assert f"Option krb5_server has value " \
+   f"{multihost.ad[0].sys_hostname}:" in log_str
+assert f"Sending initial UDP request to dgram " \
+   f"{multihost.ad[0].ip}:88" not in log_str
+assert f"Initiating TCP connection to stream {multihost.ad[0].ip}:88" \
+   not in log_str
+assert f"Initiating TCP connection to stream " \
+   f"{multihost.ad[0].ip}:" in log_str
+assert kinit_cmd.returncode == 0, "kinit failed."

[SSSD] [sssd PR#5892][closed] Tests: Add a test for BZ2004406

2022-01-06 Thread alexey-tikhonov
   URL: https://github.com/SSSD/sssd/pull/5892
Author: jakub-vavra-cz
 Title: #5892: Tests: Add a test for BZ2004406
Action: closed

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5892/head:pr5892
git checkout pr5892
___
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


[SSSD] [sssd PR#5892][-Ready to push] Tests: Add a test for BZ2004406

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5892
Title: #5892: Tests: Add a test for BZ2004406

Label: -Ready to push
___
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


[SSSD] [sssd PR#5892][-Accepted] Tests: Add a test for BZ2004406

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5892
Title: #5892: Tests: Add a test for BZ2004406

Label: -Accepted
___
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


[SSSD] [sssd PR#5892][+Pushed] Tests: Add a test for BZ2004406

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5892
Title: #5892: Tests: Add a test for BZ2004406

Label: +Pushed
___
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


[SSSD] [sssd PR#5892][comment] Tests: Add a test for BZ2004406

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5892
Title: #5892: Tests: Add a test for BZ2004406

alexey-tikhonov commented:
"""
Pushed PR: https://github.com/SSSD/sssd/pull/5892

* `master`
* 4897c28741112b547a69feb7c887764c64cc9540 - Tests: Add a test for BZ2004406

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5892#issuecomment-1006508391
___
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


[SSSD] [sssd PR#5930][-Ready to push] Tests: Health and Support Analyzer - Add request log parsing utility

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5930
Title: #5930: Tests: Health and Support Analyzer - Add request log parsing 
utility

Label: -Ready to push
___
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


[SSSD] [sssd PR#5930][closed] Tests: Health and Support Analyzer - Add request log parsing utility

2022-01-06 Thread alexey-tikhonov
   URL: https://github.com/SSSD/sssd/pull/5930
Author: shridhargadekar
 Title: #5930: Tests: Health and Support Analyzer - Add request log parsing 
utility
Action: closed

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5930/head:pr5930
git checkout pr5930
___
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


[SSSD] [sssd PR#5930][-Accepted] Tests: Health and Support Analyzer - Add request log parsing utility

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5930
Title: #5930: Tests: Health and Support Analyzer - Add request log parsing 
utility

Label: -Accepted
___
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


[SSSD] [sssd PR#5930][+Pushed] Tests: Health and Support Analyzer - Add request log parsing utility

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5930
Title: #5930: Tests: Health and Support Analyzer - Add request log parsing 
utility

Label: +Pushed
___
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


[SSSD] [sssd PR#5930][comment] Tests: Health and Support Analyzer - Add request log parsing utility

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5930
Title: #5930: Tests: Health and Support Analyzer - Add request log parsing 
utility

alexey-tikhonov commented:
"""
Pushed PR: https://github.com/SSSD/sssd/pull/5930

* `master`
* 58b3233f06c796c0928a80da63fe01a1c1fa05a4 - Tests: Health and Support 
Analyzer - Add request log parsing utility

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5930#issuecomment-1006508020
___
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


[SSSD] [sssd PR#5942][closed] Tests: Fix python-alltests-tier1-2

2022-01-06 Thread alexey-tikhonov
   URL: https://github.com/SSSD/sssd/pull/5942
Author: aborah-sudo
 Title: #5942: Tests: Fix python-alltests-tier1-2
Action: closed

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5942/head:pr5942
git checkout pr5942
___
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


[SSSD] [sssd PR#5942][-Accepted] Tests: Fix python-alltests-tier1-2

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5942
Title: #5942: Tests: Fix python-alltests-tier1-2

Label: -Accepted
___
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


[SSSD] [sssd PR#5942][-Ready to push] Tests: Fix python-alltests-tier1-2

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5942
Title: #5942: Tests: Fix python-alltests-tier1-2

Label: -Ready to push
___
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


[SSSD] [sssd PR#5942][+Pushed] Tests: Fix python-alltests-tier1-2

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5942
Title: #5942: Tests: Fix python-alltests-tier1-2

Label: +Pushed
___
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


[SSSD] [sssd PR#5942][comment] Tests: Fix python-alltests-tier1-2

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5942
Title: #5942: Tests: Fix python-alltests-tier1-2

alexey-tikhonov commented:
"""
Pushed PR: https://github.com/SSSD/sssd/pull/5942

* `master`
* 9ba593e9a1639377a89fc06cfd30b65d85517612 - Tests: Fix 
python-alltests-tier1-2

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5942#issuecomment-1006507739
___
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


[SSSD] [sssd PR#5892][+Ready to push] Tests: Add a test for BZ2004406

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5892
Title: #5892: Tests: Add a test for BZ2004406

Label: +Ready to push
___
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


[SSSD] [sssd PR#5930][+Ready to push] Tests: Health and Support Analyzer - Add request log parsing utility

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5930
Title: #5930: Tests: Health and Support Analyzer - Add request log parsing 
utility

Label: +Ready to push
___
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


[SSSD] [sssd PR#5942][+Ready to push] Tests: Fix python-alltests-tier1-2

2022-01-06 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5942
Title: #5942: Tests: Fix python-alltests-tier1-2

Label: +Ready to push
___
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


[SSSD] [sssd PR#5929][synchronized] Tests: Add tests for poor man's backtrace

2022-01-06 Thread sgoveas
   URL: https://github.com/SSSD/sssd/pull/5929
Author: sgoveas
 Title: #5929: Tests: Add tests for poor man's backtrace
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5929/head:pr5929
git checkout pr5929
From 2ab89e3399021b54bf84358e63993e49a8fe2080 Mon Sep 17 00:00:00 2001
From: Steeve Goveas 
Date: Sun, 5 Dec 2021 19:27:51 +0530
Subject: [PATCH] Tests: Add tests for poor man's backtrace

Tests are added to check that no duplicate backtrace is generated and it
is generated when
* no debug level is defined / default debug level
* debug level is set to 0 or 1
* no backtrace when debug level is >= 9
* backtrace can be disabled

Verifies: #5585
  https://bugzilla.redhat.com/show_bug.cgi?id=1949149
  https://bugzilla.redhat.com/show_bug.cgi?id=2021196
---
 src/tests/multihost/alltests/pytest.ini   |   1 +
 .../multihost/alltests/test_backtrace.py  | 167 ++
 2 files changed, 168 insertions(+)
 create mode 100644 src/tests/multihost/alltests/test_backtrace.py

diff --git a/src/tests/multihost/alltests/pytest.ini b/src/tests/multihost/alltests/pytest.ini
index ac127c07f3..8754deabef 100644
--- a/src/tests/multihost/alltests/pytest.ini
+++ b/src/tests/multihost/alltests/pytest.ini
@@ -25,6 +25,7 @@ markers =
 ssh: Tests related to ssh responder
 ldaplibdebuglevel: Test ldap_library_debug_level option
 no_tier: test cases are not executed on any tier
+backtrace: test poor man's backtrace in logs for debug level < 9
 tier1: tier1 test cases with run time of aproximately 60 minutes
 tier1_2: tier1 test cases split to keep runtime upto 60 minutes
 tier2: tier2 test cases
diff --git a/src/tests/multihost/alltests/test_backtrace.py b/src/tests/multihost/alltests/test_backtrace.py
new file mode 100644
index 00..9c890c4a0f
--- /dev/null
+++ b/src/tests/multihost/alltests/test_backtrace.py
@@ -0,0 +1,167 @@
+"""Automation poor man's backtrace
+
+:requirement: Poor Man's Backtrace
+:casecomponent: sssd
+:subsystemteam: sst_idm_sssd
+:upstream: yes
+:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1949149
+"""
+
+from __future__ import print_function
+import re
+import time
+import pytest
+from sssd.testlib.common.utils import sssdTools
+from sssd.testlib.common.expect import pexpect_ssh
+from constants import ds_instance_name
+
+
+@pytest.mark.usefixtures('setup_sssd', 'create_posix_usersgroups')
+@pytest.mark.backtrace
+@pytest.mark.tier1_2
+class TestPoorManBacktrace(object):
+""" Check sssd backtrace feature """
+def test_0001_bz2021196(self, multihost, backupsssdconf):
+"""
+:title: avoid duplicate backtraces
+:id: d4d8a0a0-ab90-4c8f-8087-95dc7ad3f3ae
+:customerscenario: true
+:bugzilla:
+  https://bugzilla.redhat.com/show_bug.cgi?id=2021196
+  https://bugzilla.redhat.com/show_bug.cgi?id=2021499
+"""
+hostname = multihost.master[0].sys_hostname
+bad_ldap_uri = f"ldaps://typo.{hostname}"
+tools = sssdTools(multihost.client[0])
+domain_params = {'ldap_uri': bad_ldap_uri}
+tools.sssd_conf(f'domain/{ds_instance_name}', domain_params)
+tools.clear_sssd_cache()
+logfile = '/var/log/sssd/sssd_nss.log'
+cmd = f'getent passwd fakeuser@{ds_instance_name}'
+multihost.client[0].run_command(cmd, raiseonerr=False)
+msg = 'BACKTRACE DUMP ENDS HERE'
+msg2 = '... skipping repetitive backtrace ...'
+pattern = re.compile(fr'{msg}')
+pattern2 = re.compile(fr'{msg2}')
+log_str1 = multihost.client[0].get_file_contents(logfile). \
+decode('utf-8')
+multihost.client[0].run_command(f'> {logfile}')
+multihost.client[0].run_command(cmd, raiseonerr=False)
+time.sleep(2)
+log_str2 = multihost.client[0].get_file_contents(logfile). \
+decode('utf-8')
+# Check the backtrace is dumped first time and no backtrace is skipped
+assert pattern.search(log_str1) and not pattern2.search(log_str1)
+# Check there is no new backtrace with the same issue and repeative
+# backtrace is skipped
+assert pattern2.search(log_str2) and not pattern.search(log_str2)
+
+def test_0001_bz1949149(self, multihost, backupsssdconf):
+"""
+:title: backtrace is disabled if debug level >= 9
+:id: 50f2d501-3296-4229-86a0-b81844381637
+"""
+section = f"domain/{ds_instance_name}"
+param = {'debug_level': '9'}
+serv_list = ['sssd', section, 'nss', 'pam']
+tools = sssdTools(multihost.client[0])
+for serv in serv_list:
+tools.sssd_conf(serv, param)
+tools.clear_sssd_cache()
+cmd_kill = 'kill -SIGUSR2 $(pidof sssd)'
+multihost.client[0].run_command(cmd_kill, raiseonerr=False)
+cmd = f'getent passwd fakeuser@{ds_instance_name}'
+

[SSSD] [sssd PR#5929][comment] Tests: Add tests for poor man's backtrace

2022-01-06 Thread shridhargadekar
  URL: https://github.com/SSSD/sssd/pull/5929
Title: #5929: Tests: Add tests for poor man's backtrace

shridhargadekar commented:
"""
Some places in code, are using f-strings and some are not. Like line34,37 and 
other. Try to implement f-strings through out the MR.
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5929#issuecomment-1006391313
___
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