Bug 29074 - udm-cli-server: Irreführende Fehlermeldung beim Anlegen des Socket-Verzeichnisses
udm-cli-server: Irreführende Fehlermeldung beim Anlegen des Socket-Verzeichni...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 3.0
Other Linux
: P4 minor (vote)
: UCS 3.2
Assigned To: Philipp Hahn
Lukas Walter
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-06 11:40 CET by Philipp Hahn
Modified: 2013-11-19 06:41 CET (History)
4 users (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): Cleanup, Troubleshooting
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2012-11-06 11:40:13 CET
Eigentliche Ursache was ein vollgelaufenes Dateiesystem und nicht das existieren des Sockets.

diff --git a/branches/ucs-3.1/ucs/management/univention-directory-manager-modules/univention-cli-server b/branches/ucs-3.1/ucs/management/univention-directory-manager-modules/univention-cli-server
index 99ef547..0953f6d 100755
--- a/branches/ucs-3.1/ucs/management/univention-directory-manager-modules/univention-cli-server
+++ b/branches/ucs-3.1/ucs/management/univention-directory-manager-modules/univention-cli-server
@@ -37,6 +37,7 @@ import socket
 import select
 import os
 import sys
+import errno
 import traceback
 import univention.config_registry
 import univention.debug
@@ -66,10 +67,10 @@ class myRequestHandler(SocketServer.BaseRequestHandler):
                doit(sarglist, self.request)
                univention.debug.debug(univention.debug.ADMIN, univention.debug.INFO, 'daemon [%s] connection closed [%s]' % (os.getppid(), os.getpid()))
 
-
        def finish(self):
                pass
 
+
 class ForkingTCPServer(SocketServer.ForkingTCPServer):
 
        address_family=socket.AF_UNIX
@@ -131,8 +132,12 @@ def main():
        try:
                os.mkdir(socket_dir)
                os.chmod(socket_dir, 0700)
-       except:
-               print 'E: Socket directory exists (%s)' % socket_dir
+       except OSError, ex:
+               if ex.errno != errno.EEXIST:
+                       print >> sys.stderr, "E: %s %s" % (socket_dir, ex)
+                       sys.exit(1)
+               else:
+                       print >> sys.stderr, 'E: Socket directory exists (%s)' % socket_dir
 
        if configRegistry.has_key('directory/manager/cmd/timeout'):
                timeout=configRegistry['directory/manager/cmd/timeout']
Comment 1 Philipp Hahn univentionstaff 2013-08-26 14:47:27 CEST
r43453 | Bug #29074,Bug #30974: udm-cli revamp
univention-directory-manager-modules_9.0.17-1.1039.201308261445

ChangeLog:
The code of the command line programs has been modernized.
An error message regarding an existing directory has been corrected.
Comment 2 Liam Schwez univentionstaff 2013-08-27 17:05:24 CEST
-In univention-cli-server in line Nr. 189 variable next_is_logfile is compared to "1". Should be "True" as part of code renewal.
Comment 3 Liam Schwez univentionstaff 2013-08-27 17:10:43 CEST
Troubleshooting of the native error "An error message regarding an existing directory has been corrected" is OK.
Comment 4 Philipp Hahn univentionstaff 2013-08-27 19:51:10 CEST
(In reply to Liam Schwez from comment #2)
> -In univention-cli-server in line Nr. 189 variable next_is_logfile is
> compared to "1". Should be "True" as part of code renewal.

r43489 | Bug #30974: Fix one more boolean comparison
univention-directory-manager-modules_9.0.19-1.1044.201308271941
Comment 5 Lukas Walter univentionstaff 2013-09-17 13:52:41 CEST
ok: Irreführende Fehlermeldung ersetzt.
ok: changelog entry.
Comment 6 Stefan Gohmann univentionstaff 2013-11-19 06:41:49 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".