Bug 42935 - univention-upgrade --noninteractive fails if (docker) app updates are available
Summary: univention-upgrade --noninteractive fails if (docker) app updates are available
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
Version: UCS 4.1
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 4.1-4-errata
Assignee: Dirk Wiesenthal
QA Contact: Stefan Gohmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-11 14:08 CET by Felix Botner
Modified: 2017-03-15 17:06 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2016-11-11 14:08:04 CET
@host-> univention-upgrade --check
Checking for package updates:                           none
Checking for app updates:                               found

@host -> univention-upgrade --noninteractive
Checking for local repository:                          none
Checking for package updates:                           none
Checking for app updates:                               found
The following apps can be upgraded:
Horde Groupware Webmail Edition: The underlying container can be upgraded
Starting app upgrade                                   ERROR: app upgrade failed. Please check /var/log/univention/updater.log

No app update, no release update, no nothing

reason,
the app update wants credentials (i think for a univention-run-join-script or something like that) but can't ask for them, because of --noninteractive and now the app upgrade in univention-upgrade thinks the best way to handle this situation is to abort the upgrade !?

...WARNING:univention.appcenter.actions.upgrade:Invalid credentials
Invalid credentials
...WARNING:univention.appcenter.actions.upgrade:Invalid credentials
Invalid credentials
...WARNING:univention.appcenter.actions.upgrade:Invalid credentials
Too many failed attempts!
...WARNING:univention.appcenter.actions.upgrade:Too many failed attempts!
Aborting...
...WARNING:univention.appcenter.actions.upgrade:Aborting...

Solution, rename "--noninteractive" to "--abort-update" at least now it is clear what happens,
no seriously, "--noninteractive" is used by customers and univention-upgrade should do its job even if that means that AppCenter joinscripts can't be executed
Comment 1 Dirk Wiesenthal univentionstaff 2017-02-17 14:27:42 CET
Fixed that one strongly in
  univention-updater 11.0.11-16.1502.201702171356

No error during App update will abort univention-upgrade. This includes asking for credentials with --noninteractive, but also everything else that can possibly go wrong.

Advantage 1: If an App update goes wrong because of a bug fixed in 4.1-5 (but not in 4.1-4), the whole process may still succeed.
Advantage 2: I do not need to check for --noninteractive and carefully test whether credentials will be needed down the road ... but may be substituted by the machine account? Just do it, and maybe the App can install without asking for credentials. Maybe you need to run the joinscripts afterwards.
Comment 2 Stefan Gohmann univentionstaff 2017-02-21 16:03:50 CET
Tests: It works and it makes sense.

--------------------------------------------------------------------------
Checking for local repository:                          none
Checking for package updates:                           none
Checking for app updates:                               found

The following apps can be upgraded:

ownCloud 8.2: Version 8.2.6 can be upgraded to 8.2.9

Starting app upgrade                                   
Do you want to upgrade ownCloud 8.2 [Y|n]? 

File: /etc/univention/service.info/services/univention-appcenter.cfg
File: /var/www/ucs-overview/entries.json
ERROR: app upgrade failed. Please check /var/log/univention/updater.log

Checking for release updates:                           found: UCS 4.1-4
Do you want to update to 4.1-4 [Y|n]? y

Starting update to UCS version 4.1-4
[...]
--------------------------------------------------------------------------

Code review: OK

UCS 4.2 merge: OK

YAML: OK
Comment 3 Janek Walkenhorst univentionstaff 2017-03-15 17:06:59 CET
<http://errata.software-univention.de/ucs/4.1/407.html>