Bug 41869 - univention-upgrade: Do not fail if App Center is not reachable
univention-upgrade: Do not fail if App Center is not reachable
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.1
Other Linux
: P1 normal (vote)
: UCS 4.1-3-errata
Assigned To: Dirk Wiesenthal
Philipp Hahn
:
Depends on:
Blocks: 41853
  Show dependency treegraph
 
Reported: 2016-07-28 17:31 CEST by Dirk Wiesenthal
Modified: 2016-10-04 14:03 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2016-07-28 17:31:38 CEST
This breaks univention-upgrade.app_upgrade_search.call (if for example the appcenter is not reachable, which is the case in many update tests).

+++ This bug was initially created as a clone of Bug #41853 +++

We need dev Tools for working with the Test App Center / Self Service via command line.

First step: univention-app extensions.
Comment 1 Dirk Wiesenthal univentionstaff 2016-08-16 00:15:14 CEST
Using call_safe() instead of call() in
  univention-updater 11.0.11-3.1483.201608160000
Comment 2 Philipp Hahn univentionstaff 2016-09-16 14:46:16 CEST
OK: r71728

OK:
 ip route add prohibit "$(dig +short appcenter.software-univention.de)"
 univention-upgrade --check
  Checking for app updates:                               An error occurred - see "/var/log/univention/updater.log" for details
Comment 3 Philipp Hahn univentionstaff 2016-09-16 16:49:03 CEST
FAIL: r72203 is not merged into UCS-4.2

FYI: bad karma points for "UserCancelled": using exception for flow control is an anti-pattern!
Comment 4 Dirk Wiesenthal univentionstaff 2016-09-20 10:58:57 CEST
(In reply to Philipp Hahn from comment #3)
> FAIL: r72203 is not merged into UCS-4.2
> 

This is actually Bug#41840

The whole change is essentially:
- app_upgrade_search.call()
+ try:
+   app_upgrade_search.call()
+ except Abort:
+   pass

(maybe I changed something in the import section, but this, too, is the same in 4.1-3 as in 4.2-0)

> FYI: bad karma points for "UserCancelled": using exception for flow control
> is an anti-pattern!

Fortunately, this will be reverted.
Comment 5 Florian Best univentionstaff 2016-09-20 11:22:53 CEST
(In reply to Dirk Wiesenthal from comment #4)
> > FYI: bad karma points for "UserCancelled": using exception for flow control
> > is an anti-pattern!
> 
> Fortunately, this will be reverted.
The "Abort"-exception is the same btw ^^
Comment 6 Philipp Hahn univentionstaff 2016-09-21 12:03:27 CEST
OK: 11.0.11-8.1490.201609201429
OK: 4.1-3
OK: 4.2-0
OK: errata-announce -V --only univention-updater.yaml
FIXED: univention-updater.yaml
 r72716
Comment 7 Janek Walkenhorst univentionstaff 2016-09-21 14:30:20 CEST
<http://errata.software-univention.de/ucs/4.1/275.html>