Bug 50057 - Reinitialize Docker App
Reinitialize Docker App
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-1-errata
Assigned To: Dirk Wiesenthal
Jannik Ahlers
:
Depends on:
Blocks: 50071
  Show dependency treegraph
 
Reported: 2019-08-26 14:24 CEST by Dirk Wiesenthal
Modified: 2019-08-28 15:50 CEST (History)
0 users

See Also:
What kind of report is it?: Feature Request
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:
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 2019-08-26 14:24:11 CEST
We want to be able to reinitialize a running Docker App: This creates a new container but with the latest App Settings.

This is necessary, if the App cannot apply App Settings during runtime but relies on getting those as environment variables during the container creation.
Comment 1 Dirk Wiesenthal univentionstaff 2019-08-26 14:34:50 CEST
Fixed in
  univention-appcenter 8.0.11-52A~4.4.0.201908261425


Essentially this is a "remove" + "install" but with the new settings. In fact, we already have that: "univention-app upgrade" does this when a new image is found. So we use this method here (but with the very same image...)

This way store_data and restore_data is implemented properly. Also copying the correct files (/etc/machine.secret, ...) is already done.

We just need to make sure that we do not use credentials:
* No setup script called
* No App Attributes registered

App Attributes are just skipped - the App was already installed successfully, no need to do it again. The setup script may be mandatory and may rely on credentials: The script refuses to continue in this case.

This is how it works:
Put this into your configure_host script:
if [ "$1" = "settings" ]; then
  univention-app reinitialize $myapp
fi
Comment 2 Jannik Ahlers univentionstaff 2019-08-28 09:35:12 CEST
Reinitialization works for multi container apps: OK
Env variables get passed correctly for multi container apps: OK
Reinitialization works for single container apps: OK
Env variables get passed correctly for single container apps: OK
Installation: OK
YAML: I did a small typo fix, otherwise OK

-> Verified
Comment 3 Erik Damrose univentionstaff 2019-08-28 15:50:04 CEST
<http://errata.software-univention.de/ucs/4.4/244.html>