Bug 39199 - Ports for Docker Apps
Ports for Docker Apps
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Felix Botner
Dirk Wiesenthal
: interim-2
Depends on:
Blocks: 39791
  Show dependency treegraph
 
Reported: 2015-08-17 10:08 CEST by Stefan Gohmann
Modified: 2015-11-17 12:12 CET (History)
1 user (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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2015-08-17 10:08:07 CEST
A Docker App can define ports which will be used exclusive by the Docker App. That means the port of the Docker host is redirected to the Docker container.

The ports can be defined via the ini file.
Comment 1 Dirk Wiesenthal univentionstaff 2015-10-20 00:17:41 CEST
I suggest putting the pre-install test in the already existing must_have_no_conflicts_apps. Otherwise one needs to implement the frontend code for a new requirement - with pretty much the same text as must_have_no_conflicts_apps. It should not matter whether the conflict is from stating the conflict explicitely in the ini file or "implicitely" from the port config.
Comment 2 Stefan Gohmann univentionstaff 2015-10-20 08:44:14 CEST
From Jenkins:

(2015-10-20 02:34:54.895325)Traceback (most recent call last):
(2015-10-20 02:34:54.895389)  File "75_app_ports_exclusive", line 13, in <module>
(2015-10-20 02:34:54.895452)    import pytest
(2015-10-20 02:34:54.895538)ImportError: No module named pytest

For example: http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-0/job/Autotest%20MultiEnv/SambaVersion=s3,Systemrolle=member/68/testReport/junit/80_docker/78_app_ports_conflicts_redirect/test/
Comment 3 Felix Botner univentionstaff 2015-10-20 10:51:40 CEST
We already have the two app ini options PortsExclusive, PortsRedirection.
I just added another check to must_have_no_conflicts_apps() in python/appcenter/app.py and umc/python/appcenter/app_center.py to prohibit the installation if a port in PortsExclusive or the host port in PortsRedirection is already used.


ucs-test:
80_docker/75_app_ports_exclusive
80_docker/76_app_ports_redirect
80_docker/77_app_ports_conflicts_exclusive
80_docker/78_app_ports_conflicts_redirect

(In reply to Dirk Wiesenthal from comment #1)
> I suggest putting the pre-install test in the already existing
> must_have_no_conflicts_apps. Otherwise one needs to implement the frontend
> code for a new requirement - with pretty much the same text as
> must_have_no_conflicts_apps. It should not matter whether the conflict is
> from stating the conflict explicitely in the ini file or "implicitely" from
> the port config.

yep, changed that
Comment 4 Dirk Wiesenthal univentionstaff 2015-11-02 14:27:51 CET
When upgrading from V1.0 (PortsExclusive=2000) to V2.0 (PortsExclusive=2000) the test fails while it should not.
Comment 5 Felix Botner univentionstaff 2015-11-02 14:55:28 CET
fixed (ignore "myself" in port checks)
Comment 6 Dirk Wiesenthal univentionstaff 2015-11-05 09:57:59 CET
OK, works. Changelog entry added.
Comment 7 Stefan Gohmann univentionstaff 2015-11-17 12:12:19 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".