Bug 34836 - Cleanup old TCP references in udm-cli; now uses AF_UNIX
Cleanup old TCP references in udm-cli; now uses AF_UNIX
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 5.0
All Linux
: P5 enhancement (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on: 34440 34784
Blocks: 37102
  Show dependency treegraph
 
Reported: 2014-05-15 08:22 CEST by Philipp Hahn
Modified: 2021-08-31 18:26 CEST (History)
3 users (show)

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?: 3: Will affect average number of 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.103
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, Error handling, UCS Performance
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.95 KB, patch)
2016-07-26 16:05 CEST, Florian Best
Details | Diff
patch (2.20 KB, patch)
2016-07-26 17:38 CEST, Florian Best
Details | Diff
34836.sh (1.40 KB, application/x-sh)
2017-07-05 12:05 CEST, Florian Best
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-05-15 08:22:10 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.
Comment 1 Florian Best univentionstaff 2016-07-26 16:05:28 CEST
Created attachment 7834 [details]
patch

This also fixes that "univention-cli-server <defunct>" is always listed in the process list.
Comment 2 Florian Best univentionstaff 2016-07-26 17:38:55 CEST
Created attachment 7835 [details]
patch

One hunk was missing in the patch before.
Comment 3 Johannes Keiser univentionstaff 2017-07-03 11:26:15 CEST
(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
Comment 4 Florian Best univentionstaff 2017-07-03 12:42:03 CEST
OK: CLI-Server is still working as before
OK: YAML (adjusted in r80763)
Comment 5 Florian Best univentionstaff 2017-07-05 09:24:09 CEST
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
Comment 6 Florian Best univentionstaff 2017-07-05 12:05:53 CEST
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.
Comment 7 Florian Best univentionstaff 2021-08-31 18:26:26 CEST
Fixed with git:24d80da96abee8e87545c3897a59298c1b057f43 in UCS 5.0 already.