Univention Bugzilla – Bug 47619
univention-upgrade --noninteractive may remove apps
Last modified: 2018-12-06 12:55:45 CET
UCS 4.2-4 system with an App, the App is appbox and support UCS 4.2 and 4.3 Now i started a univention-upgrade --noninteractive, first thing that happens Starting univention-upgrade. Current UCS version is 4.2-4 errata490 Checking for local repository: none Checking for package updates: none Checking for app updates: found The following apps can be upgraded: EGroupware: Version 17.1.20180625-docker can be upgraded to 17.1.20180720-docker-ucs43 ERROR: app upgrade failed. Please check /var/log/univention/updater.log Checking for release updates: found: UCS 4.3-0 Starting update to UCS version 4.3-0 and the appcenter.log Going to upgrade EGroupware (17.1.20180720-docker-ucs43) ... 4654 actions.upgrade 18-08-20 14:04:21 [ INFO]: Executing interface setup for egroupware 4654 actions.upgrade 18-08-20 14:04:21 [ INFO]: Copying App Center's setup to container's /usr/share/univention-docker-container-mode/setup_custom 4654 actions.upgrade 18-08-20 14:04:21 [ WARNING]: Invalid credentials 4654 actions.upgrade 18-08-20 14:04:21 [ WARNING]: Invalid credentials 4654 actions.upgrade 18-08-20 14:04:21 [ WARNING]: Invalid credentials 4654 actions.upgrade 18-08-20 14:04:21 [CRITICAL]: Too many failed attempts! 4654 actions.upgrade 18-08-20 14:04:21 [ WARNING]: Aborting... 4654 actions.remove 18-08-20 14:04:21 [ DEBUG]: Calling remove 4654 actions.remove.progress 18-08-20 14:04:21 [ DEBUG]: 0 4654 actions.remove 18-08-20 14:04:21 [ INFO]: Going to remove EGroupware (17.1.20180720-docker-ucs43)
Created attachment 9632 [details] appcenter.log
please remove the workaround in scenarios/update-testing/update-from-4.0-5-with-horde.cfg once this is fixed
Fixed (or at least improved) in: univention-appcenter 7.0.2-27A~4.3.0.201809111135 Credentials are now checked and requested before installation / upgrade / removal. If this fails, the routine is aborted, but will not result in a revert (as nothing changed yet). This does not solve the problem completely. But install(revert=False) during the revert may result in broken docker installations. After some consideration, I did not want to do it this way. We now tackle the most prominent problems: docker pull fails credentials are invalid (probably due to --noninteractive) At least this improves the situation, which may be enough for now. (Note: I first sought for situations where credentials are really needed, but found that the cases where no password is required are so rare - and may change in the future! - that I went for always asking)
*** Bug 47161 has been marked as a duplicate of this bug. ***
FAIL - please remove the revert for non-docker apps in docker_upgrade.py (and create a new bug for that ) OK - noninteractive update fails -> univention-upgrade --noninteractive --ignoressh --ignoreterm Starting univention-upgrade. Current UCS version is 4.3-1 errata229 Checking for local repository: none Checking for package updates: none Checking for app updates: found The following apps can be upgraded: WordPress: Version 4.8.0 can be upgraded to 4.9.4 Starting app upgrade ERROR: app upgrade failed. Please check /var/log/univention/appcenter.log Checking for release updates: found: UCS 4.3-2 Starting update to UCS version 4.3-2 HINT: Please check the release notes carefully BEFORE updating to UCS 4.3-2: English version: https://docs.software-univention.de/release-notes-4.3-2-en.html German version: https://docs.software-univention.de/release-notes-4.3-2-de.html Please also consider documents of following release updates and 3rd party components. Update will wait here for 60 seconds... Press CTRL-c to abort or press ENTER to continue Checking for space on /var/cache/apt/archives: OK Checking for space on /boot: OK Checking for space on /: OK Checking for package status: OK Checking LDAP schema: OK Starting update process, this may take a while. Check /var/log/univention/updater.log for more information. Running postup.sh script:done. Starting univention-upgrade. Current UCS version is 4.3-2 errata229 Checking for local repository: none Checking for package updates: none Checking for app updates: found The following apps can be upgraded: WordPress: Version 4.8.0 can be upgraded to 4.9.4 Starting app upgrade ERROR: app upgrade failed. Please check /var/log/univention/appcenter.log Checking for release updates: none Setting update/available and the appcenter log 8330 actions.upgrade 18-09-11 14:32:19 [ INFO]: Going to upgrade WordPress (4.9.4) 8330 actions.upgrade 18-09-11 14:32:19 [ WARNING]: Invalid credentials 8330 actions.upgrade 18-09-11 14:32:20 [ WARNING]: Invalid credentials 8330 actions.upgrade 18-09-11 14:32:20 [ WARNING]: Invalid credentials 8330 actions.upgrade 18-09-11 14:32:20 [CRITICAL]: Unable to upgrade wordpress. Aborting... 8330 actions.upgrade.progress 18-09-11 14:32:20 [ DEBUG]: 100 and the app is still installed (in the old version) -> univention-app info UCS: 4.3-2 errata229 Installed: samba4=4.7 4.1/wordpress=4.8.0 Upgradable: wordpress
Done in univention-appcenter 7.0.2-28A~4.3.0.201809111522
OK
Sönke says you wanted to revert this? Bug 47806 comment 4
univention-appcenter 7.0.2-31A~4.3.0.201809181530 Now checking whether an App really needs credentials. They are not needed for join scripts (and therefore not for every Non-Docker App where we cannot know whether or not join scripts exist). It would help to have credentials here, but installation / upgrade can proceed, maybe resulting in some join scripts to be not yet executed. Here is a list of Apps that do not need credentials: >>> from univention.appcenter.app_cache import * >>> from univention.appcenter.actions import * >>> i = get_action('install') >>> i = i() >>> apps = Apps().get_every_single_app() >>> for app in apps: >>> if not i.needs_credentials(app): >>> print app >>> adconnector=12.0 adtakeover=5.0 asm=1.0 audriga-groupware-migration=1.0 bareos=17.2.6 cups=2.2.1 dhcp-server=12.0 fetchmail=6.3.26 filewave=12.8.0 filewave=12.9.0 filewave=12.9.1 gitlab-ce=10.8.4-ce.0 google-apps=2.1 google-apps=2.2 guacamole=2.0.8-27 iku-av-mail=1.0-5 iku-av-proxy=1.0-5 kde=5.8 kix2017=17.3.2 klms=1.2.2 klms=1.2.3 klms=1.2.4 kopano-core=8.4.5.0 kopano-core=8.6.2.1 kopano-webapp=3.4.2.1108 kopano-webapp=3.4.15.1513 kopano-webapp=3.4.19.1649 kopano-webmeetings=3.0.1.100 kvm=2.8 ldap-usercert=4.1.0-11 letsencrypt=1.2.0 letsencrypt=1.2.2-3 m23=18.2-43 m23=18.2-43b m23=18.2-43c m23=18.2-43d maildisclaimer=2.2.2 maildisclaimer=2.2.3 mailserver=12.0 mobydick=1.0.0 nagios=4.3 office365=2.1 office365=2.2 open-xchange-guard=2.10.0-ucs1 open-xchange-text=7.10.0-ucs1 openitcockpit=3.3 openvpn4ucs=1.1.14 openvpn4ucs=1.1.15 oxseforucs=7.10.0-ucs1 papercut-ng=0.1 pkgdb=11.0 printquota=10.0 privacyidea=2.23.1 privacyidea=2.23.2 privacyidea-radius=2.23.1 prometheus-node-exporter=1.0-beta radius=5.0 samba-memberserver=4.7 samba4=4.7 self-service=3.0 sep-sesam=4.4.3-48.2 sep-sesam-cli=4.4.3-48.2 squid=3.5 stashcat=0.1 ucc=3.0 ucsschool=4.3 v1 ucsschool=4.3 v2 ucsschool=4.3 v3 ucsschool=4.3 v4 ucsschool=4.3 v5 univention-demo-data=2.1.0-1 uvmm=7.0 uvmm-ec2=1.0 webuntis=0.1 webweaver=2.0.0-4 webweaver=2.0.0-5 xrdp=0.9.1 xrdp=0.9.1-1 z-push-kopano=2.3.8 z-push-kopano=2.4.2 zimbra=1.1 zuludesk=1.0 4.2/agorumcore-pro=8.1.12.3-1000 4.2/agorumcore-pro=8.2.0.3-1011 4.2/bettermarks=1.0 4.2/ejabberd-ecs=18.04 4.2/kopano-playground=70 4.2/kopano-playground=75 4.2/noctua=3.0 4.2/redis=3.2 4.1/agorumcore-pro=7.10.1 4.1/edusharing=3.0.12.6.9 4.1/filewave=12.1.0 4.1/filewave=12.2.0 4.1/filewave=12.3.0 4.1/filewave=12.3.0 ucs-1
OK -> univention-app install --noninteractive ucsschool Going to install UCS@school (4.3 v4) Creating data directories for ucsschool... -> univention-app install --noninteractive wordpress Going to install WordPress (4.9.4) Invalid credentials Invalid credentials Invalid credentials Unable to install wordpress. Aborting... and the upgrade is fine too (aborts app upgrade " Unable to upgrade wordpress. Aborting..." instead of removing the app) OK - yaml
<http://errata.software-univention.de/ucs/4.3/249.html>