Repository navigation
[autobackport: sssd-2-13] tests: clear sssd cache in teardown of AD idmap range tests - #9505
Merged
spoore1 merged 1 commit intoOct 20, 2026
Conversation
madhuriupadhye
approved these changes
Oct 20, 2026
Reset cache between idmap range tests to avoid invalid cache entries
that cause failures for the next test.
Details from Claude:
The Testidmaprange tests in test_id_mapping.py set a small
ldap_idmap_range_size and let sssd cache an idmap slice computed
under that value. Each test restored sssd.conf at the end via
sssd_conf(action='delete'), but never cleared the sssd cache, and
that restore line was skipped whenever the test body failed an
assertion first.
As a result, the cached idmap slice (computed under the small
range_size) survived into later tests. Once the default range_size
was restored, the AD backend re-read the stale slice from the cache
and rejected it on startup:
sdap_idmap_add_domain: BUG: Range maximum exceeds the global
maximum: 3082911935 > 2000200000
sdap_idmap_init: Could not add domain ... Unexpected ID map
configuration ... remove the sssd cache
sssm_ad_init: Unable to init AD module [22]: Invalid argument
sssd_be then exited (code 3), sssd failed to start, and every
subsequent AD test that performs a realm join + sssd restart failed
Add an autouse teardown fixture that restores the default idmap
configuration and clears the sssd cache after every test, so it runs
even when a test fails. Remove the now-redundant inline
sssd_conf(action='delete') cleanup from each test.
Assisted-by: Claude Code (Opus 4.8)
Reviewed-by: Madhuri Upadhye <mupadhye@redhat.com>
(cherry picked from commit 493e37f)
Contributor
Author
|
The pull request was accepted by @madhuriupadhye with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
sssd-bot
force-pushed
the
SSSD-sssd-backport-pr9412-to-sssd-2-13
branch
from
October 20, 2026 07:42
9ed21f4 to
feed02b
Compare
madhuriupadhye
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automatic backport of PR#9412 tests: clear sssd cache in teardown of AD idmap range tests to branch sssd-2-13, created by @spoore1.
Please make sure this backport is correct.
Note
The commits were cherry-picked without conflicts.
You can push changes to this pull request
Original commits
493e37f - tests: clear sssd cache in teardown of AD idmap range tests
Backported commits
Original Pull Request Body
Reset cache between idmap range tests to avoid invalid cache entries that cause failures for the next test.
Details from Claude:
The Testidmaprange tests in test_id_mapping.py set a small ldap_idmap_range_size and let sssd cache an idmap slice computed under that value. Each test restored sssd.conf at the end via sssd_conf(action='delete'), but never cleared the sssd cache, and that restore line was skipped whenever the test body failed an assertion first.
As a result, the cached idmap slice (computed under the small range_size) survived into later tests. Once the default range_size was restored, the AD backend re-read the stale slice from the cache and rejected it on startup:
sssd_be then exited (code 3), sssd failed to start, and every subsequent AD test that performs a realm join + sssd restart failed
Add an autouse teardown fixture that restores the default idmap configuration and clears the sssd cache after every test, so it runs even when a test fails. Remove the now-redundant inline sssd_conf(action='delete') cleanup from each test.
Assisted-by: Claude Code (Opus 4.8)