Bug 53218 - Changed ListenerUdmModules in app ini does not change ldap_filter of listener module when updating app
Changed ListenerUdmModules in app ini does not change ldap_filter of listener...
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-04 10:23 CEST by Daniel Tröder
Modified: 2021-05-04 10:48 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Workaround is available
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2021-05-04 10:23:57 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.
Comment 1 Daniel Tröder univentionstaff 2021-05-04 10:48:19 CEST
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).