Univention Bugzilla – Bug 42934
appcenter join script is copied to container during univention-app update in container
Last modified: 2017-01-18 13:58:21 CET
docker apps: The AppCenter join scripts (the ones in the repository) are supposed to run on the docker host, but an "univention-app updates" in the container copies these files (join script, unjoin , manybe others) into the containers /usr/lib/univention-install @container-> univention-app update ... 1 file(s) are new Starting to download 1 file(s) directly Copying /var/cache/univention-appcenter/egroupware_20161031104758.inst to /usr/lib/univention-install/50egroupware.inst univention-run-join-script in the container now fails (the join script can't be executed in the container). univention-check-join-status in the container gives an error (Error: Not all install files configured: 1 missing) and this is an indication for an App update: @container -> /usr/share/univention-docker-container-mode/update_available + univention-check-join-status + '[' '!' 1 -eq 0 ']' + echo packages packages @host -> univention-upgrade --check Checking for package updates: none Checking for app updates: found Please rerun command without --check argument to install. But this update fails (of course) because the join script can not be successfully executed in the container, urgh @host -> univention-upgrade Horde Groupware Webmail Edition: The underlying container can be upgraded Starting app upgrade Do you want to upgrade Horde Groupware Webmail Edition [Y|n]? Username [Administrator]: Password for Administrator: ERROR: app upgrade failed. Please check /var/log/univention/updater.log notice -> "The underlying container can be upgraded" - NO, join scripts are not executed Even worse, univention-upgrade is aborted before release updates, so one has to ignore app updates (or use --disable-app-updates) in order to "release" update the docker host. This should be easy to fix (do not copy appcenter files if univention-app is executed in the container), but man is this a complicated process, if something breaks in the appcenter/upgrade part, i think nobody except super duper univention-appcenter/docker/univention-upgrade experts are able to even find the problem ...
Added utils.container_mode() (returns True if docker/container/uuid is set) and replaced ucr.get('docker/container/uuid') with container_mode() in univention-appcenter. _update_local_files() returns if container_mode(). univention-appcenter: r75823 merged to 4.2-0
Changeset: OK 4.2: OK YAML: OK
<http://errata.software-univention.de/ucs/4.1/377.html>