Univention Bugzilla – Bug 53218
Changed ListenerUdmModules in app ini does not change ldap_filter of listener module when updating app
Last modified: 2021-05-04 10:48:19 CEST
The Kelvin API version 1.4.0 was released with an error in the ini file: --- ucsschool-kelvin-rest-api_20210223082023.ini --------------------------- ListenerUdmModules = users/user, groups/group ---------------------------------------------------------------------------- This lead to non-stop restarts of the Kelvin API server, as the listener_trigger script rebuilds a library and then restarts the API server. So an updated app version (1.4.1) was released with a fixed ListenerUdmModules setting: --- ucsschool-kelvin-rest-api_20210503144001.ini --------------------------- ListenerUdmModules = settings/extended_attribute, settings/extended_options, settings/udm_module, settings/udm_syntax ---------------------------------------------------------------------------- But when the app is updated, the listener module is not: ---------------------------------------------------------------------------- root@m20:~# univention-app install ucsschool-kelvin-rest-api=1.4.0 ... Created symlink /etc/systemd/system/multi-user.target.wants/univention-appcenter-listener-converter@ucsschool-kelvin-rest-api.service → /lib/systemd/system/univention-appcenter-listener-converter@.service. Added Listener for ucsschool-kelvin-rest-api=1.4.0 Restarting Listener... Restarting univention-directory-listener (via systemctl): univention-directory-listener.service. ... ---------------------------------------------------------------------------- root@m20:~# ls -l /usr/lib/univention-directory-listener/system/ucsschool-kelvin-rest-api.py -rw-r--r-- 1 root root 712 Mai 4 10:08 /usr/lib/univention-directory-listener/system/ucsschool-kelvin-rest-api.py root@m20:~# grep ldap_filter /usr/lib/univention-directory-listener/system/ucsschool-kelvin-rest-api.py ldap_filter = '(|(univentionObjectType=users/user)(univentionObjectType=groups/group))' ---------------------------------------------------------------------------- root@m20:~# univention-app upgrade ucsschool-kelvin-rest-api Going to upgrade UCS@school Kelvin REST API (1.4.1) ... ---------------------------------------------------------------------------- root@m20:~# ls -l /usr/lib/univention-directory-listener/system/ucsschool-kelvin-rest-api.py -rw-r--r-- 1 root root 712 Mai 4 10:08 /usr/lib/univention-directory-listener/system/ucsschool-kelvin-rest-api.py root@m20:~# grep ldap_filter /usr/lib/univention-directory-listener/system/ucsschool-kelvin-rest-api.py ldap_filter = '(|(univentionObjectType=users/user)(univentionObjectType=groups/group))' ---------------------------------------------------------------------------- The listener module ucsschool-kelvin-rest-api.py was not updated and thus our customers still have a big problem! When updating an app, the appcenter should update the listener module.
Turns out that the "ldap_filter" variable in the listener module is not used at all. Instead it fetches the current setting from the appcenter. So the only thing to do, is to restart the listener service. (Although changing the variable in the file would be good for transparency.) => When updating an app, the appcenter should restart the listener service (if the ListenerUdmModules setting changed).