Univention Bugzilla – Bug 43823
Docker Apps: store /etc/machine.secret during image update
Last modified: 2017-10-19 10:51:05 CEST
At least for non appbox images we need to store the /ect/machine.secret (password for the docker container host object) before an image update and restore the file after the update.
It can be done with the "store_data" and "restore_data_before_setup" app life cycle scripts, but i think this should be done by the appcenter.
Package: univention-appcenter Version: 6.0.8-20A~4.2.0.201708101305 Branch: ucs_4.2-0 univention-appcenter (6.0.8-20): r81987 | Bug #43823: yaml r81984 | Bug #43823: don't use a new machine secret on container upgrades
Reverted with r81994 due to conflicting errata. Recommitted with r82054.
(In reply to Eduard Mai from comment #3) > Reverted with r81994 due to conflicting errata. Recommitted with r82054. As discussed, slightly changed: docker_cp() to docker.cp_from_container()
I am getting 'Register' object has no attribute '_get_docker' Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 245, in call_with_namespace result = self.main(namespace) File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/register.py", line 82, in main self._register_host_for_apps(apps, args) File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/register.py", line 249, in _register_host_for_apps self._register_host(app, args) File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/register.py", line 262, in _register_host docker = self._get_docker(self.old_app) AttributeError: 'Register' object has no attribute '_get_docker' _get_docker is defined in DockerActionMixin (python/appcenter-docker/actions/docker_base.py). Better do a manual from univention.appcenter.docker import Docker docker = Docker(app, self.logger) Catch ImportError, though, univention-appcenter-docker might not be installed
moved docker cp machine.secret to docker_upgrade.py._upgrade_image() univention-appcenter r82518 errata4.2-1
Works fine YAML: OK
<http://errata.software-univention.de/ucs/4.2/158.html>