Univention Bugzilla – Bug 45784
(7.8.2/4.1) Performance issue with listgroup and large environments
Last modified: 2018-04-12 10:23:44 CEST
+++ This bug was initially created as a clone of Bug #45625 +++ Backport group listener cache enhancements to 4.1.
Git commits were cherry-picked from 4.2 branch: commit f9659e13b4e2864d77cd77f3aec77c3805418f8a Bug #45625: add changelog entry (cherry picked from commit 6d6fff7) commit a99a39ae5333375842b432cd47cc9871878f49a6 Bug #45625: call rebuild_cache_if_required() with Exclusive lock (cherry picked from commit 67d2ea2) commit aad0f1c1d646580994420e0d93f95e697d163dac Bug #45625: always fix ownership of cache directory before opening DB (cherry picked from commit 2d5d286) commit 17dbbf16a4436fde9fb08cc59908848753d0ee4f Bug #45625: do not rebuild cache upon opening the database (cherry picked from commit 2813c8a) commit e0c5c8005931d1674b9417cfedc7a56a9acb12a1 Bug #45625: small mypy comment fix (cherry picked from commit 0e64a53) commit cf9e7442f844f739ff6644bc13136a926c4bae28 Bug #45625: use generic lock file (cherry picked from commit 6385dad) commit d120107622fa0d0880ae692b90af7c132543d8a8 Bug #45625: Exclusive now uses a generic lock file if none was specified (cherry picked from commit d652be0) commit e744ad62437b9292fc903306b60543ea95bfdc7d Bug #45625: make sure that the group cache is ready before using it (cherry picked from commit af56722) commit 07205defb626ceefb366a3f4e551d84a5686bb36 Bug #45625: do not give read permissions to others for DB file (cherry picked from commit 3b6d322) commit 33f687a4aecd531b0a034de650f5cd8c75dd2f7e Bug #45622, #45625, #45700: add changelog entries (cherry picked from commit bb108c0) commit 59bab9a64c27676220a079e2cbf5dc889103478e Bug #45625: use new OXGroupCache (cherry picked from commit 05cafd0) commit ac71631d26d7ec14ede8a6a7eb83820a0fb191d0 fixup! Bug #45625: add comments for mypy (cherry picked from commit 0e7f71e) commit 96b21de00ba0e6741b67182c3cd28cd13707edac Bug #45625: use new OXGroupCache The logger is now initialized much earlier (on module level and not within handler()). The OXGroupCache is invalidated on each startup of the Univention Directory Listener but NOT on each call of the cron job. (cherry picked from commit 49d5bc3) commit 201d857fa07d0f4b64f2a5af4df210a852f777ff Bug #45625: removed unused import (cherry picked from commit ab82fb7) commit e835746272296d04b1a7dbfa25f4843fda306c3a Bug #45625: add comments for mypy (cherry picked from commit 5af8545) commit 4eb70cb10152854d27670eebf335f80e6bf2139f Bug #45625: add error message if primary group cannot be found in LDAP (cherry picked from commit 76b3092) commit 2d310515cea168bf25ee920edabaf9ab971a708a Bug #45625: deactivate unused code (cherry picked from commit e416fca) commit cd9fee67f67974730fa97c6b971c349d95915731 Bug #45625: cleanup (cherry picked from commit 1d3886f) commit 4b1950614a7ebe1ba55a92293e2ae3c66cc942cc Bug #45625: fix typo in exception causing a new traceback (cherry picked from commit f1bd34b) commit 2fc972611e2d9c56ed7597c1630d4958d4ca9e58 Bug #45625: clearify exception (cherry picked from commit 552c04a) commit b0a3487e58e040692adafc1e54189dd39ef0ede9 Bug #45625: add comments for mypy (cherry picked from commit 5bb7d28) commit 164f60e0378f7111fc9ec40d9f2bfb3ed5517766 Bug #45625: use new OXGroupCache (cherry picked from commit d57fe21) commit e1cd533896dc2ca0b2b9061342d6110537892244 Bug #45625: replace remaining ox_list_user with use of OXUserIdCache (cherry picked from commit ba5ab1e) commit 404968263093a80dc9b8db3f129f3bbdd95ae52a Bug #45625: add OXGroupCache and ReadonlyOXGroup classes (cherry picked from commit 6fde2ee) commit e1a3ff69cd500ea8934b682ff0fbdd90ddf727b0 Bug #45625: use logger instead of stdout (cherry picked from commit 31c3d8f) commit f512af47110132c28b5583bd5c5353ac346b2e01 Bug #45625: fix traceback if queue directory does not exist upon creating lock file (cherry picked from commit d424bf4) commit 2e376ab5e194ce8933bc1f83bb62705a5f393e10 Bug #45625: make debug output more readable (cherry picked from commit b0ef336) commit 95cf35f564bc79087dee5121151d75b6b2be4722 Bug #45625: add comments for mypy (cherry picked from commit 686312b) commit 3dd74f5a8e6180261c8c9961aae12c738cb4b5b8 Bug #45625: fix traceback if get_ox_group returns None via row (cherry picked from commit 2fe418f) univention-ox (8.1.4-1) ucs-test-oxseforucs (3.0.4-5)
Ticket #2017092121000212 - Waiting for commit: 164f60e0
In a system with lots of groups, each group create takes a long time if no searchpattern is used. --- a/univention-ox/share/listener_tools.py +++ b/univention-ox/share/listener_tools.py @@ -446,7 +446,7 @@ class OXGroupCache(object): ''' Add group for a specific group and context with data from OX. ''' - for row in ox_list_group(admuser, admpass, context_id, logger=self.logger): + for row in ox_list_group(admuser, admpass, context_id, searchpattern=groupname, logger=self.logger): if row[CSV_GROUP_ROW_GROUPNAME].lower() == groupname.lower(): self.logger.debug('add_from_ox: groupname=%r group_id=%r context_id=%r displayname=%r members=%r' % ( groupname,
[4.1 36c96f0] Bug #45784: speed up group query univention-ox 8.1.4-5.227.201802131449
→ NO QA → RESOLVED → CLOSED This issue has been filed against UCS 4.1. UCS 4.1 and OX 7.8.2 is out of maintenance and many UCS and OX components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS/OX versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.