Univention Bugzilla – Bug 39462
Copy join status while performing a container upgrade
Last modified: 2015-11-17 12:12:01 CET
See also Bug #39204 The default store data scripts should copy the join status, e.g. - parts of /etc/univention/base*conf - /etc/*secret - /var/univention-join/* - /var/lib/univention-ldap/ - /var/lib/univention-directory-listener/ - ...
I've updated store_data and restore_data_before_setup (r64563). Some files are now copied, I guess we need copy some more. The UCR variables are complete restored expect a blacklist like version/*.
-> /usr/share/ucs-test/runner python -f /usr/share/ucs-test/80_docker/78_app_ports_conflicts_redirect univention-app install --noninteractive --username=Administrator --pwdfile=/var/lib/ucs-test/pwdfile app Going to install app (6.1.3) Creating data directories for app... Registering UCR for app Marking app=6.1.3 as installed File: /etc/univention/service.info/services/univention-appcenter.cfg Creating /etc/init.d/docker-app-app Multifile: /etc/apache2/sites-available/default-ssl Multifile: /etc/apache2/sites-available/default Adding localhost to LDAP object Multifile: /etc/apache2/sites-available/default-ssl Multifile: /etc/apache2/sites-available/default Reloading web server config: apache2. Creating data directories for app... Registering the container host app-1445329878155843 for app Downloading app image docker.software-univention.de/ucs-appbox-amd64:4.1-0. This may take several minutes 4.1-0: Pulling from docker.software-univention.de/ucs-appbox-amd64 b7899339a230: Already exists 8ef51e30e75f: Already exists 5e05c3b7fdba: Already exists bb89f467f5a5: Already exists bb89f467f5a5: Already exists Digest: sha256:f1109923b9c883d6f65c05f17effc2ebc49ee8af7c5d55278265051280c9e80e Status: Image is up to date for docker.software-univention.de/ucs-appbox-amd64:4.1-0 Verifying app image docker.software-univention.de/ucs-appbox-amd64:4.1-0 Initializing app image Preconfiguring container c0e3470c4284a861632e5b71a7ec99cfd4ca5c375fb403c7e7096e49072b1c62 Starting app Container c0e3470c4284a861632e5b71a7ec99cfd4ca5c375fb403c7e7096e49072b1c62 .... /usr/sbin/ucr Setting registry variables for app Setting update/secure_apt Create repository/app_center/server Setting server/role Setting repository/online/server Create updater/identify Create ldap/master Create nameserver/external Create locale/default Setting nameserver2 Setting nameserver1 Setting domainname Create ldap/hostdn Setting locale Setting nameserver/option/timeout Setting ldap/master/port Create update/warning/releasenotes File: /etc/welcome.msg Multifile: /etc/postfix/ldap.virtualwithcanonical File: /etc/default/locale File: /etc/issue Multifile: /etc/hosts Multifile: /etc/postfix/ldap.virtual File: /etc/libnss-ldap.conf File: /etc/locale.gen Generating locales (this might take a while)... de_DE.UTF-8... done en_US.UTF-8... done Generation complete. File: /etc/cron.d/univention-directory-policy File: /etc/default/ntpdate Multifile: /etc/postfix/main.cf File: /usr/share/univention-management-console/modules/setup-certificate.xml Multifile: /etc/postfix/ldap.saslusermapping File: /etc/apt/sources.list.d/20_ucs-online-component.list File: /etc/ntp.conf File: /etc/pam.d/smtp File: /etc/pam_ldap.conf File: /etc/krb5.conf File: /etc/resolv.conf File: /etc/issue.net File: /etc/apt/apt.conf.d/20secureapt File: /etc/dhcp/dhclient.conf Multifile: /etc/postfix/ldap.canonicalsender Multifile: /etc/postfix/ldap.canonicalrecipient Multifile: /etc/postfix/ldap.transport File: /etc/apt/apt.conf.d/55user_agent File: /etc/apt/sources.list.d/15_ucs-online-version.list Multifile: /etc/postfix/ldap.virtualdomains Multifile: /etc/postfix/ldap.distlist Multifile: /etc/postfix/ldap.groups Multifile: /etc/postfix/ldap.sharedfolderlocal File: /etc/mailname File: /etc/profile Multifile: /etc/postfix/ldap.sharedfolderremote File: /etc/runit/univention-directory-listener/run File: /etc/apt/mirror.list Executing interface restore_data_before_setup for app ** Restore forced UCR layer: Traceback (most recent call last): File "/usr/share/univention-docker-container-mode/restore_data_before_setup", line 100, in <module> restore_ucr_layer(os.path.join(conf_dir, 'base-forced.conf'), {'force': True}) File "/usr/share/univention-docker-container-mode/restore_data_before_setup", line 74, in restore_ucr_layer f = open(ucr_file, "r") IOError: [Errno 2] No such file or directory: '/var/lib/univention-appcenter/apps/app/conf/base-forced.conf' Executing interface setup for app Maybe check if ucr_file exists in restore_ucr_layer() in /usr/share/univention-docker-container-mode/restore_data_before_setup?
The first version has been added. I've also added a test case: 80_docker/64_app_container_upgrade
FAIL - store_data destroys links OK - test OK - upgrade (install -> store_data -> upgrade -> restore_data_before_setup -> store_data)
(In reply to Felix Botner from comment #4) > FAIL - store_data destroys links Fixed in univention-docker-container-mode: r64998 + r65002 I've also improved the test case: r64997
OK
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".