Univention Bugzilla – Bug 30417
univention-upgrade should suggest App Center updates
Last modified: 2015-11-10 10:16:30 CET
Using "univention-upgrade" or the Online Update UMC Module tells the user the system is up to date even if there are updates in the App Center available. It would be easier for the user to be informed about available updates or at least to be informed about the other tool/UMC-module to check for updates.
Occured at a customer, too.
We will not ship a UCS 3.1-2 release; the next UCS release will be UCS 3.2. As such, this bug is moved to the new target milestone.
This led to a broken system for customer 05520: DRBD was installed from the App Center, univention-upgrade installed the kernel errata update, but after the update the compatible drbd kernel module wasn't available and the in-kernel module was selected. That module is incompatible with the DRBD userland tools and refused to work, so that data partition couldn't be mounted.
The README_*UPDATE should be shown during the upgrade.
This issue was mentioned also at ticket #2013091121001471.
Still valid with UCS 4.0
@Dirk, can you give a short overview about the App Center API so that Philipp can integrate it into univention-upgrade?
Created attachment 6958 [details] Poposed patch for updater Currently not applicable, as the function in UMC is not yet committed.
Created attachment 7022 [details] univention-upgrade.patch This is what I used to test Bug#38697
(In reply to Dirk Wiesenthal from comment #9) > Created attachment 7022 [details] > univention-upgrade.patch > > This is what I used to test Bug#38697 Sorry, the patch is broken. You need to initialize run_app = False in the first line after "for app in new_apps:"
And ask for credentials after telling why they are needed. See Bug#38697 Comment 7 Username and password file can be passed to app_upgrade.call(username=..., pwdfile=...)
r63317 | Bug #30417 updater: Add App update support r63316 | Bug #30417 updater: Rework argument passing r63315 | Bug #30417 updater: Fix Python issues r63314 | Bug #30417 updater: Add App update support r63313 | Bug #30417 updater: Rework argument passing r63312 | Bug #30417 updater: Fix Python issues Patch updated and applied Added lots of error handling Package: univention-updater Version: 10.0.55-3.1400.201508281517 Branch: ucs_4.0-0 Scope: errata4.0-3 Package: univention-updater Version: 11.0.1-2.1399.201508281517 Branch: ucs_4.1-0 FYI: Testes with xrdp app OK: univention-upgrade OK: univention-upgrade --skip-apps OK: univention-upgrade --noninteractive OK: univention-upgrade --noninteractive --username=... --pwdfile=.. OK: univention-upgrade --username=... --pwdfile=.. FYI: Credentials are not validated by updater - admin is supposed to know what he/she is doing. r63318 | Bug #30417 updater: Add App update support YAML 2015-08-28-univention-updater.yaml (In reply to Dirk Wiesenthal from comment #10) > Sorry, the patch is broken. You need to initialize > run_app = False > in the first line after "for app in new_apps:" That's wrong; should be True (In reply to Dirk Wiesenthal from comment #11) > And ask for credentials after telling why they are needed. See Bug#38697 > Comment 7 > > Username and password file can be passed to app_upgrade.call(username=..., > pwdfile=...) Providing a wrong username/password still seems to work - broken backend code?
r63473 | Bug #30417 updater: Add App update support r63472 | Bug #30417 updater: Add App update support TODO: fix credentials issue TODO: build
*** Bug 39287 has been marked as a duplicate of this bug. ***
r63693 | Bug #30417 updater: Ignore app center unavailable r63692 | Bug #30417 updater: Ignore app center unavailable Ignore App Center exception Package: univention-updater Version: 10.0.55-4.1406.201509151021 Branch: ucs_4.0-0 Scope: errata4.0-3 Package: univention-updater Version: 11.0.2-3.1405.201509151021 Branch: ucs_4.1-0 r63694 | Bug #30417 updater: Ignore app center unavailable YAML 2015-08-28-univention-updater.yaml
I am unsure if the bug should be reopened because of the following issue, resolve it again if this is considered a minor issue. If i try univention-upgrade on a unjoined system, univention-upgrade prints [...] Checking for release updates: none Checking for package updates: none Checking for app updates: skipped Error: /etc/machine.secret not found I think we should check if the system is joined, and only then print the error message.
(In reply to Erik Damrose from comment #16) > If i try univention-upgrade on a unjoined system, univention-upgrade prints > > [...] > Checking for release updates: none > Checking for package updates: none > Checking for app updates: skipped > Error: /etc/machine.secret not found This is a bug in "univention-check-joins-status" which is called by the updater: # mv machine.secret X # univention-check-join-status Error: /etc/machine.secret not found # dpkg -S univention-check-join-status univention-join: /usr/sbin/univention-check-join-status While fixing that, the test also needs to be skipped on "server/role=basesystem"
See Bug #39405#c2, the output of univention-updater is now confusing. > This is a bug in "univention-check-joins-status" which is called by the > updater: > > # mv machine.secret X > # univention-check-join-status > Error: /etc/machine.secret not found I'm not sure if it is really a bug in univention-check-join-status. That is the target of the tool. We should either remove univention-check-join-status from univention-upgrade or we shouldn't print the messages of univention-check-join-status directly to the console.
(In reply to Stefan Gohmann from comment #18) > See Bug #39405#c2, the output of univention-updater is now confusing. > > > This is a bug in "univention-check-joins-status" which is called by the > > updater: > > > > # mv machine.secret X > > # univention-check-join-status > > Error: /etc/machine.secret not found > > I'm not sure if it is really a bug in univention-check-join-status. That is > the target of the tool. See Bug #39405 comment 3 > We should either remove univention-check-join-status from univention-upgrade > or we shouldn't print the messages of univention-check-join-status directly > to the console. r64204 | Bug #30417 updater: Remove join status check Package: univention-updater Version: 11.0.2-6.1408.201510050855 Branch: ucs_4.1-0
YAML: OK (small adjustments with r64836 because perfroma is no English word and the updates are not installed by default). ucs-test: OK Tests without App update: Fail (In reply to Philipp Hahn from comment #19) > > We should either remove univention-check-join-status from univention-upgrade > > or we shouldn't print the messages of univention-check-join-status directly > > to the console. > > r64204 | Bug #30417 updater: Remove join status check > > Package: univention-updater > Version: 11.0.2-6.1408.201510050855 > Branch: ucs_4.1-0 root@member404:~# mv /etc/machine.secret /etc/machine.secret2 root@member404:~# univention-upgrade --enable-app-updates Starting univention-upgrade. Current UCS version is 4.0-3 errata342 Checking for local repository: none Checking for release updates: none Checking for package updates: none Checking for app updates: unavailable Error: /etc/machine.secret not found root@member404:~# → Please merge r64204 from UCS 4.1 to 4.0-3-errata. Tests with more than one App update: TODO Tests on a member server: TODO Release upgrade via UMC: TODO
(In reply to Stefan Gohmann from comment #20) > Error: /etc/machine.secret not found ... > → Please merge r64204 from UCS 4.1 to 4.0-3-errata. r64840 | Bug #30417 updater: Remove join status check Package: univention-updater Version: 10.0.55-5.1418.201510261045 Branch: ucs_4.0-0 Scope: errata4.0-3 r64841 | Bug #30417 updater: Remove join status check CL 2015-08-28-univention-updater.yaml
(In reply to Philipp Hahn from comment #21) > (In reply to Stefan Gohmann from comment #20) > > Error: /etc/machine.secret not found > ... > > → Please merge r64204 from UCS 4.1 to 4.0-3-errata. > > r64840 | Bug #30417 updater: Remove join status check > > Package: univention-updater > Version: 10.0.55-5.1418.201510261045 > Branch: ucs_4.0-0 > Scope: errata4.0-3 > > r64841 | Bug #30417 updater: Remove join status check CL > 2015-08-28-univention-updater.yaml OK, that looks good now. But the App upgrade does not work. I've installed the following versions: univention-updater 10.0.55-5.1418.2015102610 univention-management-console-module-appcenter 4.1.20-49.432.201509171525 "Checking for app updates" shows always the status unavailable: root@master401:~# univention-upgrade --enable-app-updates Starting univention-upgrade. Current UCS version is 4.0-3 errata342 Checking for local repository: none Checking for release updates: none Checking for package updates: none Checking for app updates: unavailable root@master401:~# This import fails which leads to the unavailable status: root@master401:~# python2.7 -c 'from univention.appcenter.app_center import AppcenterServerContactFailed' Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named app_center root@master401:~#
Fixed ImportError in univention-updater 10.0.55-6.1421.201510270053 Also silenced UCR's print statements during update search. Don't know if this is enough, though.
(In reply to Stefan Gohmann from comment #20) > Tests with more than one App update: TODO → OK > Tests on a member server: TODO → OK > Release upgrade via UMC: TODO → OK Non interactive upgrade: OK (In reply to Dirk Wiesenthal from comment #23) > Fixed ImportError in > univention-updater 10.0.55-6.1421.201510270053 → I've added the new version to the YAML file. > Also silenced UCR's print statements during update search. Don't know if > this is enough, though. Not really, but I think we should start with this version: --------------------------------------------------------------------- root@master401:~# univention-upgrade --enable-app-updates Starting univention-upgrade. Current UCS version is 4.0-3 errata342 Checking for local repository: none Checking for release updates: none Checking for package updates: none Checking for app updates: found The following apps can be updated: Dudle: Version 1.0.0-1 can be updated to 1.0.0-2 ownCloud 8: Version 8.0.3 can be updated to 8.0.8 Starting app upgrade Do you want to upgrade Dudle [Y|n]? y Dudle 1.0.0-2 Update Notes Bug fixes * An encoding related issue made new dudle entries with non-ascii characters in the title unaccessible after creation. This release fixes it, the App now supports UTF-8 characters everywhere. Press [ENTER] to continue Username [Administrator]: Password for Administrator: File: /etc/apt/sources.list.d/20_ucs-online-component.list File: /var/www/ucs-overview/entries.json File: /etc/apt/mirror.list File: /etc/apt/sources.list.d/15_ucs-online-version.list File: /usr/share/univention-management-console/modules/apps.xml File: /usr/share/univention-management-console/i18n/de/apps.mo File: /etc/apt/apt.conf.d/55user_agent Do you want to upgrade ownCloud 8 [Y|n]? y Username [Administrator]: Password for Administrator: File: /etc/apt/sources.list.d/20_ucs-online-component.list File: /var/www/ucs-overview/entries.json File: /etc/apt/mirror.list File: /etc/apt/sources.list.d/15_ucs-online-version.list File: /usr/share/univention-management-console/modules/apps.xml File: /usr/share/univention-management-console/i18n/de/apps.mo File: /etc/apt/apt.conf.d/55user_agent done Setting update/available root@master401:~# ---------------------------------------------------------------------
<http://errata.software-univention.de/ucs/4.0/345.html>