Bug 42970 - Docker Apps have an unhandy init script default
Docker Apps have an unhandy init script default
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-1-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
: 45113 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-16 12:27 CET by Dirk Wiesenthal
Modified: 2018-08-22 14:26 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 7: Crash: Bug causes crash or data loss
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.400
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 Dirk Wiesenthal univentionstaff 2016-11-16 12:27:37 CET
The default for the init script is /sbin/init. This works well for appbox images. But it does not for most others.

In fact, even appbox images do not need this value, because it is the Entrypoint defined in the original Docker file.

We need to get rid of this default value. It just makes providing Docker Apps more difficult without adding anything. Unfortunately, we need to adjust RequiredUCSVersion for those Apps to the errata level of this very bug, because otherwise the old default value is still used.

Also, the init script may be shipped along with the App, just like a join script. This does not make sense. The script cannot be copied to the container before the container is started. We have to work with what is inside the container.
Comment 1 Dirk Wiesenthal univentionstaff 2016-11-16 12:36:51 CET
(In reply to Dirk Wiesenthal from comment #0)
> Also, the init script may be shipped along with the App, just like a join
> script. This does not make sense. The script cannot be copied to the
> container before the container is started. We have to work with what is
> inside the container.

Alternatively, we may keep the functionality and mount the shipped script into the container. But this requires a dedicated place for this script. The App Center needs to copy the script into, say, /usr/share/univention-appcenter/apps/init/$appid/.
ini:
DockerScriptInit=/opt/bin/ucs/init
DockerVolumes=/usr/share/univention-appcenter/apps/init/$appid/:/opt/bin/ucs/
Comment 2 Jürn Brodersen univentionstaff 2018-06-07 17:16:39 CEST
I'm trying to setup prometheus as a docker app using the container from docker hub. It seems that /sbin/init is added as command line option to the already defined Entrypoint. Prometheus doesn't like that and crashes...

The self service should have an option to set that as an empty value.
Comment 3 Stefan Gohmann univentionstaff 2018-06-22 16:38:52 CEST
I've also tried to add a docker image and this was my first blocker.

I've switched the view to the ISV into the value for "How will those affected feel about the bug?".
Comment 4 Stefan Gohmann univentionstaff 2018-06-25 07:22:02 CEST
*** Bug 45113 has been marked as a duplicate of this bug. ***
Comment 5 Dirk Wiesenthal univentionstaff 2018-07-21 13:54:12 CEST
Fixed in
  univention-appcenter 7.0.2-11A~4.3.0.201807211346

The init value is deleted without replacement. We always use the CMD initially specified in the Dockerfile.
Comment 6 Felix Botner univentionstaff 2018-07-23 11:43:31 CEST
as discussed, please revert the change, make the DockerScriptInit optional with no default and edit the provider portal description (command not entrypoint).
Comment 7 Dirk Wiesenthal univentionstaff 2018-07-27 10:30:56 CEST
Done in
  univention-appcenter 7.0.2-13A~4.3.0.201807271026
Comment 8 Felix Botner univentionstaff 2018-08-01 13:22:17 CEST
FAIL - yaml
please change the description in the yaml file, DockerScriptInit has no longer a default but can be set

OK - provider portal description
OK - DockerScriptInit has no longer a default, but is used as docker CMD if set
Comment 9 Dirk Wiesenthal univentionstaff 2018-08-01 21:31:53 CEST
(In reply to Felix Botner from comment #8)
> FAIL - yaml
> please change the description in the yaml file, DockerScriptInit has no
> longer a default but can be set
Done
Comment 10 Felix Botner univentionstaff 2018-08-02 11:00:44 CEST
OK
Comment 11 Arvid Requate univentionstaff 2018-08-22 14:26:16 CEST
<http://errata.software-univention.de/ucs/4.3/211.html>