Bug 39957 - Listener cache and handler initialization
Listener cache and handler initialization
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-0-errata
Assigned To: Philipp Hahn
Stefan Gohmann
:
: 23762 (view as bug list)
Depends on:
Blocks: 39958
  Show dependency treegraph
 
Reported: 2015-11-15 21:06 CET by Stefan Gohmann
Modified: 2015-11-19 12:08 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
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

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2015-11-15 21:06:10 CET
The listener has the feature that a sync is not executed if the listener is in the initialize mode, for example:
    if ( !INIT_ONLY ) {
        dbp->sync(dbp, 0);
    }

That makes a join very fast.

If a module is installed at a later point or the initialization of a module has to be done again or at a later point, a sync is done after adding or removing every single entry.

If a handler is initialized, the sync should be done only at the end of the initialization.
Comment 1 Philipp Hahn univentionstaff 2015-11-17 08:50:22 CET
*** Bug 23762 has been marked as a duplicate of this bug. ***
Comment 2 Philipp Hahn univentionstaff 2015-11-17 17:32:33 CET
serivce univention-directory-listener stop
/usr/sbin/import_ldif_with_listener /usr/share/ucs-test-tools/customer5000.ldif
LB=$(ucr get ldap/base)

rm /var/lib/univention-directory-listener/handlers/faillog
time univention-directory-listener -F -b "$LB" -m /usr/lib/univention-directory-listener/system -c /var/lib/univention-directory-listener -d 2 -x -ZZ -D "cn=admin,$LB" -y /etc/ldap.secret

17.11.15 15:01:33.981  LISTENER    ( WARN    ) : initializing module faillog
17.11.15 15:01:37.077  LISTENER    ( WARN    ) : finished initializing module faillog

dpkg -i ../univention-directory-listener_10.0.0-3_i386.deb
rm /var/lib/univention-directory-listener/handlers/faillog
time univention-directory-listener -F -b "$LB" -m /usr/lib/univention-directory-listener/system -c /var/lib/univention-directory-listener -d 2 -x -ZZ -D "cn=admin,$LB" -y /etc/ldap.secret
...
17.11.15 15:02:20.896  LISTENER    ( WARN    ) : initializing module faillog
17.11.15 15:02:20.903  LISTENER    ( WARN    ) : finished initializing module faillog


r65674 | Bug #39957 listener: Disable DB sync while initializing module

Package: univention-directory-listener
Version: 10.0.0-3.287.201511171727
Branch: ucs_4.1-0
Scope: errata4.1-0

r65675 | Bug #39957 listener: Disable DB sync while initializing module YAML
 2015-11-17-univention-directory-listener.yaml
Comment 3 Stefan Gohmann univentionstaff 2015-11-18 13:39:12 CET
Code review: OK

YAML: OK

Test upgrade: OK (Master, Backup, Slave, Member)

Re-join: OK

Replication test: OK

Performance test: OK

Old version:
16.11.15 00:24:57.659  LISTENER    ( WARN    ) : initializing module cups-pdf
16.11.15 00:25:56.483  LISTENER    ( WARN    ) : finished initializing module cups-pdf

New version:
16.11.15 00:28:00.479  LISTENER    ( WARN    ) : initializing module cups-pdf
16.11.15 00:28:07.752  LISTENER    ( WARN    ) : finished initializing module cups-pdf
Comment 4 Janek Walkenhorst univentionstaff 2015-11-19 12:08:55 CET
<http://errata.software-univention.de/ucs/4.1/1.html>