Bug 52682 - repeated runs of well-known-sid-name-mapping take very long during AD-Takeover
repeated runs of well-known-sid-name-mapping take very long during AD-Takeover
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: PAM
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Florian Best
Arvid Requate
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-01-24 18:01 CET by Arvid Requate
Modified: 2021-05-25 16:01 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Workaround-for-Bug52682.patch (3.64 KB, patch)
2021-01-24 18:02 CET, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2021-01-24 18:01:36 CET
During AD-Takover of a non-english AD (e.g. german) the listener is very slow, because the well-known-sid-name-mapping module repeatedly sets UCR variables that cause slapd.conf to be commited again and again, which is slow due to the way schema extensions are loaded.
Comment 1 Arvid Requate univentionstaff 2021-01-24 18:02:56 CET
Created attachment 10601 [details]
Workaround-for-Bug52682.patch

We could delay the actual UCR change to the postrun.
Comment 2 Arvid Requate univentionstaff 2021-01-24 18:05:52 CET
This takes the lions share of the time actually required for an AD-Takeover.
Comment 3 Arvid Requate univentionstaff 2021-01-24 21:41:30 CET
c97420d47d Bug #52682: Avoid long delays due to repeated ucr sets
3939483599 Bug #52682: Changelog

Package: univention-pam
Version: 13.0.3-1A~5.0.0.202101242118
Branch: ucs_5.0-0
Comment 4 Florian Best univentionstaff 2021-01-25 10:28:41 CET
Commiting slapd.conf is slow due to Bug #34003 and there is a fix in https://git.knut.univention.de/univention/ucs/-/merge_requests/9.
Comment 5 Arvid Requate univentionstaff 2021-01-26 12:31:52 CET
ec22fb2017 fixup! Avoid set/unset races
Comment 6 Florian Best univentionstaff 2021-02-11 10:37:35 CET
The change causes that the following tests are failing:

 01_base/96rename_domain_users
 01_base/96rename_domain_admins
 01_base/95rename_administrator

This is because the tests wait for the post run and check the templates for occurrences of the new names. This doesn't happen as committing slapd.conf and dovecot-ldap.conf.ext takes too long then in the postrun, which was prior in the handler()-phase.

Julia and I decided to fix Bug #34003 additionally (or instead?).
Comment 7 Arvid Requate univentionstaff 2021-03-02 16:12:47 CET
Seems to work now.
Comment 8 Florian Best univentionstaff 2021-03-02 17:06:25 CET
(In reply to Arvid Requate from comment #7)
> Seems to work now.

Yes, u.a. because we fixed Bug #34003.
I am still thinking about reverting the changes. (did a few attempts to make a branch test for git:fbest/52682-revert).

Do you have an opinion about this?
The code is more complex now, better/faster for multiple-changes, longer for single-changes (needs to wait 15 seconds for postrun).
Comment 9 Arvid Requate univentionstaff 2021-03-02 18:03:40 CET
Yeah, I'm fine with that. I flipped the roles.
Comment 10 Florian Best univentionstaff 2021-03-09 17:28:20 CET
(In reply to Arvid Requate from comment #9)
> Yeah, I'm fine with that. I flipped the roles.

OK, reverted it:

univention-pam (13.0.3-2)
64b05c5b9dd8 | Revert "fixup! Bug #52682: Avoid long delays due to repeated ucr sets"
Comment 11 Arvid Requate univentionstaff 2021-03-09 20:03:02 CET
Package: univention-pam
Version: 13.0.3-2A~5.0.0.202103091622
Branch: ucs_5.0-0
Comment 12 Florian Best univentionstaff 2021-05-25 16:01:36 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".