Bug 32402 - Listener module for replication of UDM Hook extensions
Listener module for replication of UDM Hook extensions
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Arvid Requate
Stefan Gohmann
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-28 14:14 CEST by Arvid Requate
Modified: 2013-11-19 06:43 CET (History)
1 user (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 Arvid Requate univentionstaff 2013-08-28 14:14:47 CEST
A listener module for the replication of UDM Hook extensions should be implemented,

* running on UCS Master, Backup, Slave and Memberservers
* filtering for a specific objectClass representing UDM Hook extensions
* writing the value of an LDAP attribute "univentionUDMHook"
* to a file specified by another LDAP attribute "univentionUDMHookFilename"
* below the directory /usr/share/pyshared/univention/admin/hooks.d
* It must not overwrite newer versions by older versions.
* It updates the python Links e.g. by calling update-python-modules -p


These extension objects are created by metapackage joinscripts using a univention-lib function.
Comment 1 Arvid Requate univentionstaff 2013-09-05 22:23:05 CEST
Implemented as part of listener udm_extension shipped by the package python-univention-directory-manager.
Changelog committed.
Comment 2 Stefan Gohmann univentionstaff 2013-09-16 08:48:56 CEST
I got the following message in the join log of a DC Slave:

20.08.13 11:10:07.870  LISTENER    ( ERROR   ) : udm_extension: Termination of univention-cli-server processes failed: 1.
Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/udm_extension.py", line 164, in handler
    lo, ldap_position = udm_uldap.getAdminConnection()
  File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 63, in getAdminConnection
    lo=univention.uldap.getAdminConnection(start_tls, decode_ignorelist=decode_ignorelist)
  File "/usr/lib/pymodules/python2.6/univention/uldap.py", line 68, in getAdminConnection
    bindpw=open('/etc/ldap.secret').read()
IOError: [Errno 2] No such file or directory: '/etc/ldap.secret'
20.08.13 11:10:07.879  LISTENER    ( WARN    ) : handler: udm_extension (failed)
Comment 3 Arvid Requate univentionstaff 2013-09-16 17:20:20 CEST
The activation code must only run on the master, like it's done in the ldap_extesion listener. I adjusted the udm_extension listener code accordingly.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2013-09-26 14:38:35 CEST
udm_extension.py contains some typos (UCS vs. UCR):
→ current_UCR_version="%s-%s" % (listener.configRegistry.get('version/version'), 
                               listener.configRegistry.get('version/patchlevel'))
→ if univentionUCSVersionStart and current_UCR_version<univentionUCSVersionStart:
→ extension %s requires at least UCR version %s.
→ REOPEN

ucsversionend should be inclusive → separated into see Bug 32676
→ found by ucs-test 21_listener_version_start_end
→ REOPEN
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2013-09-27 11:12:22 CEST
The UCS version comparison is implemented as simple string comparison:
>>> '3.2-1' < '3.10-2'
False
>>> '3.2-9' < '3.2-10'
False
→ REOPEN
Comment 6 Arvid Requate univentionstaff 2013-10-07 21:49:56 CEST
Ok, fixed by using the UCS_Version class from univention.updater.tools.
Comment 7 Stefan Gohmann univentionstaff 2013-10-31 12:15:13 CET
Changelog + Test cases + Tests: OK
Comment 8 Stefan Gohmann univentionstaff 2013-11-19 06:43:06 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

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