#3107 Python SSSD Config API deletes an item during iteration
Closed: Fixed None Opened 3 years ago by jhrozek.

This was noted by a downstream reporter:
I ran across the same error on Fedora 24 when my sssd domain didn't match because it wasn't cased properly (eg. EXAMPLE.COM and example.com).

Looking at the lines in the trace, I don't see how it would ever succeed if the the active domains are not configured as it always tries to modify the dictionary as it's being iterated.

/usr/lib/python3.5/site-packages/SSSDConfig/init.py:
1783 configured_domains = self.list_domains()
1784 for dom in domain_dict.keys():
1785 if dom not in configured_domains:
1786 del domain_dict[dom]
1787

A quick fix is to iterate over a copy of the list from domain_dict.keys(), eg:
/usr/lib/python3.5/site-packages/SSSDConfig/init.py:
1784 for dom in list(domain_dict.keys()):


Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.14.2
owner: somebody => lslebodn

Fields changed

patch: 0 => 1
status: new => assigned
version: 1.14.0 => 1.13.4

master:

sssd-1-13:

resolution: => fixed
status: assigned => closed

Metadata Update from @jhrozek:
- Issue assigned to lslebodn
- Issue set to the milestone: SSSD 1.14.2

2 years ago

Login to comment on this ticket.

Metadata