Univention Bugzilla – Bug 41764
Check S4-Connector behaviour for groups with >1500 members
Last modified: 2017-04-04 18:28:58 CEST
We need to check if the S4-Connector can deal properly with groups containing more than 1500 members. Bug 41744 reported an issue in the AD-Connector. +++ This bug was initially created as a clone of Bug #41744 +++ If a group on UCS side contains more than 1500 member and the group will be synced to the AD all members will be removed during back sync.
Samba 4.3.7 doesn't return ranged results for attributes with more than 1500 values, but that might change in the future. We should merge the fix from Bug #41744 to be safe from unpleasant surprises.
Created attachment 8306 [details] Paged member search ported to the S4-connector
(In reply to Lukas Oyen from comment #2) > Created attachment 8306 [details] > Paged member search ported to the S4-connector The attached patches port the paged member search from bug #41744 to the s4-connector (with a slight cleanup). All s4-connector tests on a single UCS 4.1-4 errata359 are passing with the following exceptions (but those are failing the jenkins tests aswell): - 159sync_ad_create_non_domain_user - 259read_ad_create_non_domain_user - 269read_ad_move_object_from_ignore_subtree
Committed in r77169 and r77170. Changelog r77171/r77172.
svn r77170: + s4_members_lower = map(str.lower, s4_members) + if object_dn_modstring.lower() not in s4_members_lower: # add as member I think this change is dangerous because it can't handle unicode (are you 100% sure only bytes will end there?): >>> map(str.lower, ['', u'']) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: descriptor 'lower' requires a 'str' object but received a 'unicode' Better might be: if all(object_dn_modstring.lower() != x.lower() for x in s4_members):
Created attachment 8558 [details] bug41764_qa.patch The patch addresses two points: * syntax of [].extend() * Fix for Comment 5 My patch for the AD-Connector also was not optimal, because the list comprehension has a different behavior than the for / break.
(In reply to Arvid Requate from comment #6) > Created attachment 8558 [details] > bug41764_qa.patch 1st hunk: - group_cache.extend(m.lower() for m in s4_members) + group_cache.extend([m.lower() for m in s4_members]) This doesn't make a difference. `list.lower()` expects an iterator. A generator expression is a valid iterator. The old approach in fact saves some memory as it does not create a list just to throw it away. 2nd hunk: I don't mean to be harsh, but I don't see the difference or improvement upon the approach as suggested in comment #5 or the simple `if x not in y`. In fact I find a `for .. else ..` harder to read. (In reply to Florian Best from comment #5) > are you 100% sure only bytes will end there? Yes, as just above, the following was called (not pretty but it works): s4_members = map(compatible_modstring, s4_members)
Ok, changelog too.
UCS 4.2 has been released: https://docs.software-univention.de/release-notes-4.2-0-en.html https://docs.software-univention.de/release-notes-4.2-0-de.html If this error occurs again, please use "Clone This Bug".