Univention Bugzilla – Bug 51069
Support UDP Ports in docker-compose file
Last modified: 2020-04-22 15:30:32 CEST
10000:10000/udp in the docker-compose.yaml file in the appcenter fails with traceback (ValueError: invalid literal for int()) during the installation. We make a int() on the port value, so /udp is not possible at the moment.
1f8d19acf20f020c89b0b186770207767745b756 - univention-appcenter 8aa1f782f85d8d0358ea53cacea05cd92d925398 - yaml Something like 1000:1000/udp as port in the docker compose file should work now. QA please also check the jenkins tests
Your change works for me and lets me install an application with a protocol suffix in the docker compose file. I have made the console output internally available. I could further not identify any incidents in the automatic ci tests. --> verified. TODO: A follow up ticket will have to be created to make this functionality available in the app portal.
I have made an additional commit to fix another problem (too lazy to open a new bug) python/appcenter-docker/docker.py bc2383bcd155c22ea99116cb760aaa7e37cc421f - univention-appcenter 56df7792d88d5d339f9b4ebfb06e0381c907fa28 - yaml We have a feature reinitialize, which does somehting like compose down/compose up to update a compose apps env vars. But this reinitialize in the appcenter starts docker.py::MultiDocker.create() and there self._setup_yml and than self._setup_env As _setup_yml only includes env files if _setup_env finds them, no env files are included during reinitialize. I switched this to _setup_env and than _setup_yml.
(In reply to Max Pohle from comment #3) [...] > TODO: A follow up ticket will have to be created to make this functionality > available in the app portal. No, there is no extra action or issue needed. The Docker compose file as copied 1:1 to the App Provider portal. Using the syntax described above in the compose file will be sufficient.
@Felix: From your last comment I understand that this bug is resolved. I set it to status resolved, so that QA can be finished here. If not correct, please reopen the bug. From my understanding, this issue covers a bug on parsing the Docker compose UCR template when UDP is used in the ports definition. Regarding the support for UDP ports in the App Center in general, I opened Bug #51108.
As stated before the change works for me and I have now reviewed the code change as well. It checks for a slash in the port number field, which I consider to be right thing in the context of docker compose, because this application uses the same format (e.g. 10000:10000/udp). -> VERIFIED I would further recommend that we strive for keeping the format consistent between all our applications in the user interface. Other applications use formats like [protocol]://[host]:[port] and we could further discuss how to archive that in Bug #51108
<http://errata.software-univention.de/ucs/4.4/533.html>