Univention Bugzilla – Bug 51353
Migrate univention-management-console-web-server to Python 3
Last modified: 2020-06-17 15:39:26 CEST
The Univention Management Console Web Server needs to be python 3 compatible. Additionally I found an error in the current python3 status of UMC-ModuleProcesses: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/univention/management/console/protocol/modserver.py", line 354, in _do_send ret = self.__comm.send(self.__queue) BrokenPipeError: [Errno 32] Datenübergabe unterbrochen (broken pipe) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/sbin/univention-management-console-module", line 121, in <module> notifier.loop() File "/usr/lib/python3/dist-packages/notifier/nf_generic.py", line 296, in loop step() File "/usr/lib/python3/dist-packages/notifier/nf_generic.py", line 282, in step if cond & condition and fd in __sockets[cond] and not __sockets[cond][fd](sock_obj): File "/usr/lib/python3/dist-packages/univention/management/console/protocol/modserver.py", line 212, in _recv self.error_handling(msg, 'init', *sys.exc_info()) File "/usr/lib/python3/dist-packages/univention/management/console/protocol/modserver.py", line 219, in error_handling self.__handler._Base__error_handling(request, method, etype, exc, etraceback) File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 388, in __error_handling self.finished(request.id, result, message, status=status, headers=headers, error=error) File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 484, in finished self.result(res) File "/usr/lib/python3/dist-packages/univention/management/console/base.py", line 488, in result self.signal_emit('success', response) File "/usr/lib/python3/dist-packages/notifier/signals.py", line 84, in signal_emit self.__signals[signal].emit(*args) File "/usr/lib/python3/dist-packages/notifier/signals.py", line 49, in emit cb(*args) File "/usr/lib/python3/dist-packages/notifier/__init__.py", line 104, in __call__ return self._function(*tmp, **self._kwargs) File "/usr/lib/python3/dist-packages/univention/management/console/protocol/modserver.py", line 137, in _reply self.response(msg) File "/usr/lib/python3/dist-packages/univention/management/console/protocol/modserver.py", line 376, in response if self._do_send(self.__comm): File "/usr/lib/python3/dist-packages/univention/management/console/protocol/modserver.py", line 356, in _do_send if e[0] == errno.EWOULDBLOCK: TypeError: 'BrokenPipeError' object is not subscriptable Patch available in: python3/5.0-0 +++ This bug was initially created as a clone of Bug #51235 +++
Fixed: * Migrate UMC-Webserver to be Python 3 compatible * The check for the maximum Content-Length when sending an auth request did not work and has been fixed: $ curl http://localhost:8090/auth -H 'Content-Type: application/json' -d @<(python -c 'import json; print(json.dumps({"username": "A" * 1024 * 2000}))') {"status": 413, "message": "Request data is too large, allowed length is 2048000", "traceback": null, "location": "http://localhost:8090/univention/auth"} * An error in the handling of socket exceptions has been fixed: comment #0 univention-management-console.yaml b2f256f4ca04 | Bug #51353: Merge branch 'fbest/umc-webserver-python3' into 4.4-4 633f0cef884a | YAML Bug #51353 univention-management-console (11.0.4-80) b2f256f4ca04 | Bug #51353: Merge branch 'fbest/umc-webserver-python3' into 4.4-4 3ebe97b6fd5b | Bug #51353: Migrate UMC-Webserver to Python 3
OK: python2 version still works OK: no code that would break python3 OK: no switch to python3, still runs as python2 OK: advisory
<http://errata.software-univention.de/ucs/4.4/626.html>