Bug 51069 - Support UDP Ports in docker-compose file
Support UDP Ports in docker-compose file
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-4-errata
Assigned To: Felix Botner
Max Pohle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-04-06 16:09 CEST by Felix Botner
Modified: 2020-04-22 15:30 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2020-04-06 16:09:39 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.
Comment 2 Felix Botner univentionstaff 2020-04-07 16:07:09 CEST
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
Comment 3 Max Pohle univentionstaff 2020-04-09 16:33:13 CEST
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.
Comment 4 Felix Botner univentionstaff 2020-04-09 17:11:09 CEST
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.
Comment 5 Nico Gulden univentionstaff 2020-04-14 17:10:00 CEST
(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.
Comment 6 Nico Gulden univentionstaff 2020-04-15 11:25:44 CEST
@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.
Comment 7 Max Pohle univentionstaff 2020-04-17 12:14:55 CEST
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
Comment 8 Erik Damrose univentionstaff 2020-04-22 15:30:32 CEST
<http://errata.software-univention.de/ucs/4.4/533.html>