URL: https://github.com/SSSD/sssd/pull/5880 Author: dparmar18 Title: #5880: Automation code for bug 2013294/1992973/2013379 Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5880/head:pr5880 git checkout pr5880
From 24ca63bde9d377f070fe465800eb6bcdaab5d87f Mon Sep 17 00:00:00 2001 From: Dhairya Parmar <dpar...@dparmar.pnq.csb> Date: Wed, 17 Nov 2021 15:18:14 +0530 Subject: [PATCH 1/7] added test_0007_getent_admproxy() in test_misc.py --- src/tests/multihost/alltests/test_misc.py | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/tests/multihost/alltests/test_misc.py b/src/tests/multihost/alltests/test_misc.py index 3575799dce..48bdc1ca64 100644 --- a/src/tests/multihost/alltests/test_misc.py +++ b/src/tests/multihost/alltests/test_misc.py @@ -353,3 +353,48 @@ def test_0006_getent_group(self, multihost, assert "group-2@example1:*:20002:user-2@example1," \ "user-4@example1,user-6@example1," \ "user-8@example1" in cmd.stdout_text + + @pytest.mark.tier1 + def test_0007_getent_admproxy(self, multihost, backupsssdconf): + """ + :title: 'getent passwd adm@proxy' doesn't + return anything when 'cache_first = True' option is used with + nss i.e. lookup with the fully-qualified name of a user or + group will fail if the requested object is not already in the + cache. + :bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2013294 + :id: 9ff64ee0-255d-46ac-bf0a-b022eaad463e + :customerscenario: false + :steps: + 1. Configure SSSD with nss having cache_first = True. + 2. restart SSSD with empty cache. + 3. Check 'getent passwd adm@proxy' output. + :expectedresults: + 1. Should succeed + 2. Should succeed + 3. 'getent passwd adm@proxy' should return identity lookup + of user adm. + """ + getent_admproxy = "getent passwd adm@proxy" + tools = sssdTools(multihost.client[0]) + section = "sssd" + section_params = {"domains": "proxy", "services": "nss"} + tools.sssd_conf(section, section_params, action="update") + section = "domain/proxy" + section_params = {"id_provider": "proxy", "proxy_lib_name": "files", + 'auth_provider': "none"} + tools.sssd_conf(section, section_params, action="update") + section = "nss" + section_params = {"cache_first": "True"} + tools.sssd_conf(section, section_params, action="update") + tools.clear_sssd_cache(start=True) + cache_first_true = multihost.client[0].run_command(getent_admproxy, + raiseonerr=False) + assert cache_first_true.returncode == 0, "Bug 2013294/1992973/2013379" + section = "nss" + section_params = {"cache_first": "True"} + tools.sssd_conf(section, section_params, action="delete") + tools.clear_sssd_cache(start=True) + cache_first_false = multihost.client[0].run_command(getent_admproxy, + raiseonerr=False) + assert cache_first_false.returncode == 0 From c1d79c317dc3c0f3d39ee884a5c6dccec0b8ad65 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar <dpar...@dparmar.pnq.csb> Date: Wed, 17 Nov 2021 20:50:42 +0530 Subject: [PATCH 2/7] git commit template modified --- .../alltests/.git-commit-template-for-tests | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/tests/multihost/alltests/.git-commit-template-for-tests diff --git a/src/tests/multihost/alltests/.git-commit-template-for-tests b/src/tests/multihost/alltests/.git-commit-template-for-tests new file mode 100644 index 0000000000..6a27195fd7 --- /dev/null +++ b/src/tests/multihost/alltests/.git-commit-template-for-tests @@ -0,0 +1,12 @@ +TEST: Lookup with fully-qualified name with 'cache_first = True' + +EXPLANATION: +- If the 'cache_first = True' option is used with the nss responder a lookup with the fully-qualified name of a user or group will fail if the requested object is not already in the cache. +- With sssd versions < sssd-2.6.1-1.el8, using 'cache_first = True' in nss section of sssd.conf, the lookup of user or group would return nothing for 'getent passwd adm@proxy', echo $? would return code 2. +- The same works when 'cache_first = True' is not used. +- With latest rpm version sssd-2.6.1-1.el8, this issue has been fixed and this test is intended to support it. Now with 'cache_first = True' or without 'cache_first = True', +'getent passwd adm@proxy', it always returns the indentity of adm. + +Verifies + Issue:https://github.com/SSSD/sssd/issues/5744 + Bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=1992973 From 0135fb2f92c4b81d383ae32b8a0a4a4807244557 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar <dpar...@dparmar.pnq.csb> Date: Wed, 17 Nov 2021 20:55:52 +0530 Subject: [PATCH 3/7] git commit template modified --- .git-commit-template | 67 ++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 49 deletions(-) diff --git a/.git-commit-template b/.git-commit-template index b847fe40d7..d89a112803 100644 --- a/.git-commit-template +++ b/.git-commit-template @@ -1,54 +1,23 @@ -COMPONENT: Subject +TEST: Test lookup with the fully-qualified name when nss responder has the +option 'cache_first = True' and also without 'cache_first = True'. + Explanation -Resolves: https://github.com/SSSD/sssd/issues/XXXX +Resolves: https://github.com/SSSD/sssd/issues/5744 -# If a release note is required, choose one of the tags (or multiple tags if -# it makes sense) and place it here. See the description below for tag names -# and information. This is fully optional: not all changes require a release -# note. -# -# :relnote: Generic release note. -# :feature: New feature desription. -# :fixes: Notable bug fix desription. -# :packaging: Packaging change description. -# :config: Change in configuration (new option, new default, etc.) +- If the 'cache_first = True' option is used with the nss responder a lookup + with the fully-qualified name of a user or group will fail if the requested + object is not already in the cache. +- With sssd versions < sssd-2.6.1-1.el8, using 'cache_first = True' in nss +section of sssd.conf, the lookup of user or group would return nothing for +'getent passwd adm@proxy', echo $? would return code 2. +- The same works when 'cache_first = True' is not used. +- With latest rpm version sssd-2.6.1-1.el8, this issue has been fixed and +this test is intended to support it. Now with 'cache_first = True' or +without 'cache_first = True', 'getent passwd adm@proxy', it always returns +the indentity of adm. -# Try to keep the subject line within 52 chars ----| -# Also please try to not exceed 72 characters of length for the body --| -# -# *** Release notes *** -# -# Release notes for new versions are automatically generated from the -# information provided in commit messages. -# -# Ticket Resolution: -# If "Resolves: ticket_url" is found in the commit message then this ticket -# will be automatically closed when this commit is pushed to the upstream -# repository. The ticket will be also mentioned in the release notes as fixed. -# -# Ideally, each commit should resolve at most one ticket. If multiple tickets -# are resolved then repeat the whole line, i.e.: -# Resolves: Ticket #1 -# Resolves: Ticket #2 -# -# Release Notes Content -# You can also provide short description of the fix or new feature for -# the release notes using one of the release notes tag. The tag is associated -# with a human readable description which is automatically put into the -# release notes into the correct group that is determined by the tag name. -# -# The description is read until an empty line is found. And it can contain -# markdown language for enhanced formatting. -# -# Example: -# SUBJECT -# -# Commit description. -# -# Resolves: https://github.com/SSSD/sssd/issues/XXXX -# -# :fixes: This is an important bug that has been fixed. Keep the -# description short but it can also span multiple lines. -# +Verifies + Issue:https://github.com/SSSD/sssd/issues/5744 + Bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=1992973 \ No newline at end of file From 6692cd043a0a789c97292c57c29b1722ea72b003 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar <dpar...@dparmar.pnq.csb> Date: Wed, 17 Nov 2021 21:02:31 +0530 Subject: [PATCH 4/7] Revert "added test_0007_getent_admproxy() in test_misc.py" This reverts commit 24ca63bde9d377f070fe465800eb6bcdaab5d87f. --- src/tests/multihost/alltests/test_misc.py | 45 ----------------------- 1 file changed, 45 deletions(-) diff --git a/src/tests/multihost/alltests/test_misc.py b/src/tests/multihost/alltests/test_misc.py index 48bdc1ca64..3575799dce 100644 --- a/src/tests/multihost/alltests/test_misc.py +++ b/src/tests/multihost/alltests/test_misc.py @@ -353,48 +353,3 @@ def test_0006_getent_group(self, multihost, assert "group-2@example1:*:20002:user-2@example1," \ "user-4@example1,user-6@example1," \ "user-8@example1" in cmd.stdout_text - - @pytest.mark.tier1 - def test_0007_getent_admproxy(self, multihost, backupsssdconf): - """ - :title: 'getent passwd adm@proxy' doesn't - return anything when 'cache_first = True' option is used with - nss i.e. lookup with the fully-qualified name of a user or - group will fail if the requested object is not already in the - cache. - :bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2013294 - :id: 9ff64ee0-255d-46ac-bf0a-b022eaad463e - :customerscenario: false - :steps: - 1. Configure SSSD with nss having cache_first = True. - 2. restart SSSD with empty cache. - 3. Check 'getent passwd adm@proxy' output. - :expectedresults: - 1. Should succeed - 2. Should succeed - 3. 'getent passwd adm@proxy' should return identity lookup - of user adm. - """ - getent_admproxy = "getent passwd adm@proxy" - tools = sssdTools(multihost.client[0]) - section = "sssd" - section_params = {"domains": "proxy", "services": "nss"} - tools.sssd_conf(section, section_params, action="update") - section = "domain/proxy" - section_params = {"id_provider": "proxy", "proxy_lib_name": "files", - 'auth_provider': "none"} - tools.sssd_conf(section, section_params, action="update") - section = "nss" - section_params = {"cache_first": "True"} - tools.sssd_conf(section, section_params, action="update") - tools.clear_sssd_cache(start=True) - cache_first_true = multihost.client[0].run_command(getent_admproxy, - raiseonerr=False) - assert cache_first_true.returncode == 0, "Bug 2013294/1992973/2013379" - section = "nss" - section_params = {"cache_first": "True"} - tools.sssd_conf(section, section_params, action="delete") - tools.clear_sssd_cache(start=True) - cache_first_false = multihost.client[0].run_command(getent_admproxy, - raiseonerr=False) - assert cache_first_false.returncode == 0 From 32e89045a59ddb8c0bd874b9f6237b3a8393cdf6 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar <dpar...@dparmar.pnq.csb> Date: Wed, 17 Nov 2021 15:18:14 +0530 Subject: [PATCH 5/7] added test_0007_getent_admproxy() in test_misc.py --- src/tests/multihost/alltests/test_misc.py | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/tests/multihost/alltests/test_misc.py b/src/tests/multihost/alltests/test_misc.py index 3575799dce..48bdc1ca64 100644 --- a/src/tests/multihost/alltests/test_misc.py +++ b/src/tests/multihost/alltests/test_misc.py @@ -353,3 +353,48 @@ def test_0006_getent_group(self, multihost, assert "group-2@example1:*:20002:user-2@example1," \ "user-4@example1,user-6@example1," \ "user-8@example1" in cmd.stdout_text + + @pytest.mark.tier1 + def test_0007_getent_admproxy(self, multihost, backupsssdconf): + """ + :title: 'getent passwd adm@proxy' doesn't + return anything when 'cache_first = True' option is used with + nss i.e. lookup with the fully-qualified name of a user or + group will fail if the requested object is not already in the + cache. + :bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2013294 + :id: 9ff64ee0-255d-46ac-bf0a-b022eaad463e + :customerscenario: false + :steps: + 1. Configure SSSD with nss having cache_first = True. + 2. restart SSSD with empty cache. + 3. Check 'getent passwd adm@proxy' output. + :expectedresults: + 1. Should succeed + 2. Should succeed + 3. 'getent passwd adm@proxy' should return identity lookup + of user adm. + """ + getent_admproxy = "getent passwd adm@proxy" + tools = sssdTools(multihost.client[0]) + section = "sssd" + section_params = {"domains": "proxy", "services": "nss"} + tools.sssd_conf(section, section_params, action="update") + section = "domain/proxy" + section_params = {"id_provider": "proxy", "proxy_lib_name": "files", + 'auth_provider': "none"} + tools.sssd_conf(section, section_params, action="update") + section = "nss" + section_params = {"cache_first": "True"} + tools.sssd_conf(section, section_params, action="update") + tools.clear_sssd_cache(start=True) + cache_first_true = multihost.client[0].run_command(getent_admproxy, + raiseonerr=False) + assert cache_first_true.returncode == 0, "Bug 2013294/1992973/2013379" + section = "nss" + section_params = {"cache_first": "True"} + tools.sssd_conf(section, section_params, action="delete") + tools.clear_sssd_cache(start=True) + cache_first_false = multihost.client[0].run_command(getent_admproxy, + raiseonerr=False) + assert cache_first_false.returncode == 0 From 42d4158358e8fc65bf0b99af6ea3f808894a37b6 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar <dpar...@dparmar.pnq.csb> Date: Wed, 17 Nov 2021 21:06:08 +0530 Subject: [PATCH 6/7] Revert "git commit template modified" This reverts commit c1d79c317dc3c0f3d39ee884a5c6dccec0b8ad65. --- .../alltests/.git-commit-template-for-tests | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/tests/multihost/alltests/.git-commit-template-for-tests diff --git a/src/tests/multihost/alltests/.git-commit-template-for-tests b/src/tests/multihost/alltests/.git-commit-template-for-tests deleted file mode 100644 index 6a27195fd7..0000000000 --- a/src/tests/multihost/alltests/.git-commit-template-for-tests +++ /dev/null @@ -1,12 +0,0 @@ -TEST: Lookup with fully-qualified name with 'cache_first = True' - -EXPLANATION: -- If the 'cache_first = True' option is used with the nss responder a lookup with the fully-qualified name of a user or group will fail if the requested object is not already in the cache. -- With sssd versions < sssd-2.6.1-1.el8, using 'cache_first = True' in nss section of sssd.conf, the lookup of user or group would return nothing for 'getent passwd adm@proxy', echo $? would return code 2. -- The same works when 'cache_first = True' is not used. -- With latest rpm version sssd-2.6.1-1.el8, this issue has been fixed and this test is intended to support it. Now with 'cache_first = True' or without 'cache_first = True', -'getent passwd adm@proxy', it always returns the indentity of adm. - -Verifies - Issue:https://github.com/SSSD/sssd/issues/5744 - Bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=1992973 From 1d26e53771294122a37cf53800c1a2fee29bc084 Mon Sep 17 00:00:00 2001 From: Dhairya Parmar <dpar...@dparmar.pnq.csb> Date: Wed, 17 Nov 2021 21:07:03 +0530 Subject: [PATCH 7/7] Revert "git commit template modified" This reverts commit 0135fb2f92c4b81d383ae32b8a0a4a4807244557. --- .git-commit-template | 67 ++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/.git-commit-template b/.git-commit-template index d89a112803..b847fe40d7 100644 --- a/.git-commit-template +++ b/.git-commit-template @@ -1,23 +1,54 @@ -TEST: Test lookup with the fully-qualified name when nss responder has the -option 'cache_first = True' and also without 'cache_first = True'. - +COMPONENT: Subject Explanation -Resolves: https://github.com/SSSD/sssd/issues/5744 +Resolves: https://github.com/SSSD/sssd/issues/XXXX -- If the 'cache_first = True' option is used with the nss responder a lookup - with the fully-qualified name of a user or group will fail if the requested - object is not already in the cache. -- With sssd versions < sssd-2.6.1-1.el8, using 'cache_first = True' in nss -section of sssd.conf, the lookup of user or group would return nothing for -'getent passwd adm@proxy', echo $? would return code 2. -- The same works when 'cache_first = True' is not used. -- With latest rpm version sssd-2.6.1-1.el8, this issue has been fixed and -this test is intended to support it. Now with 'cache_first = True' or -without 'cache_first = True', 'getent passwd adm@proxy', it always returns -the indentity of adm. +# If a release note is required, choose one of the tags (or multiple tags if +# it makes sense) and place it here. See the description below for tag names +# and information. This is fully optional: not all changes require a release +# note. +# +# :relnote: Generic release note. +# :feature: New feature desription. +# :fixes: Notable bug fix desription. +# :packaging: Packaging change description. +# :config: Change in configuration (new option, new default, etc.) -Verifies - Issue:https://github.com/SSSD/sssd/issues/5744 - Bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=1992973 \ No newline at end of file +# Try to keep the subject line within 52 chars ----| +# Also please try to not exceed 72 characters of length for the body --| +# +# *** Release notes *** +# +# Release notes for new versions are automatically generated from the +# information provided in commit messages. +# +# Ticket Resolution: +# If "Resolves: ticket_url" is found in the commit message then this ticket +# will be automatically closed when this commit is pushed to the upstream +# repository. The ticket will be also mentioned in the release notes as fixed. +# +# Ideally, each commit should resolve at most one ticket. If multiple tickets +# are resolved then repeat the whole line, i.e.: +# Resolves: Ticket #1 +# Resolves: Ticket #2 +# +# Release Notes Content +# You can also provide short description of the fix or new feature for +# the release notes using one of the release notes tag. The tag is associated +# with a human readable description which is automatically put into the +# release notes into the correct group that is determined by the tag name. +# +# The description is read until an empty line is found. And it can contain +# markdown language for enhanced formatting. +# +# Example: +# SUBJECT +# +# Commit description. +# +# Resolves: https://github.com/SSSD/sssd/issues/XXXX +# +# :fixes: This is an important bug that has been fixed. Keep the +# description short but it can also span multiple lines. +#
_______________________________________________ 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