Univention Bugzilla – Bug 34836
Cleanup old TCP references in udm-cli; now uses AF_UNIX
Last modified: 2021-08-31 18:26:26 CEST
+++ This bug was initially created as a clone of Bug #34784 +++ atexit() and try-finally are not executed when a process is terminated through a signal, so the old PID file and socket are not cleaned up in that case. It only happens when the CLI sever times out in the select() call. "allow_reuse_address = 1" does not work for AF_UNIX and should be removed to not confuse future readers: <http://stackoverflow.com/questions/15716302/so-reuseaddr-and-af-unix> "ForkingTCPServer" should also be renamed to "ForkingServer", as it no longer uses AF_INET but AF_UNIX and (thus no TCP). It should probably inherit UnixStreamServer and ForkingMixIn; see /usr/lib/python2.6/SocketServer.py The method server_bind() should also be removed, as it no longer applies to AF_UNIX. With the switch to UNIX the comment in /usr/sbin/udm:89 > # this takes a long time if getfqdn(host) is used in cli-server also no longer applies.
Created attachment 7834 [details] patch This also fixes that "univention-cli-server <defunct>" is always listed in the process list.
Created attachment 7835 [details] patch One hunk was missing in the patch before.
(In reply to Florian Best from comment #2) > Created attachment 7835 [details] > patch > > One hunk was missing in the patch before. Applied patch: r 80755 univention-directory-manager-modules (12.0.17-46) * Bug #34836: Applied patch from Florian Best - Cleanup old TCP references in udm-cli YAML: r 80757
OK: CLI-Server is still working as before OK: YAML (adjusted in r80763)
Two test cases are failing due to the change. It seems the UDM CLI server doesn't get restarted after the removal of extended attributes. I reverted the changes therefore. univention-directory-manager-modules (12.0.17-58): r80843 | Bug #34836: revert svn r80755 univention-directory-manager-modules.yaml: r80844 | YAML Bug #34836
Created attachment 8999 [details] 34836.sh Reproducer. I don't understand why the change makes any difference. Even when comparing the logfiles with directory/manager/cmd/debug/level='4' there is no real difference. It seems the already removed extended attribute is still registered in the groups/group module.property_descriptions but the modules.init() call doesn't find it anymore.
Fixed with git:24d80da96abee8e87545c3897a59298c1b057f43 in UCS 5.0 already.