Bug 39463 - Upgrade 4.0 -> 4.1: Installed Apps need to be reregistered
Upgrade 4.0 -> 4.1: Installed Apps need to be reregistered
Status: CLOSED WORKSFORME
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Dirk Wiesenthal
Stefan Gohmann
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-02 18:19 CEST by Dirk Wiesenthal
Modified: 2015-11-17 12:12 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
updater.log (212.72 KB, text/plain)
2015-10-27 12:16 CET, Stefan Gohmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2015-10-02 18:19:39 CEST
In 4.0 Apps were marked as installed implicitely: If their DefaultPackages were installed, the whole app was installed

In 4.1 Apps are marked explicitely:
  ucr set \
    appcenter/apps/$APPID/status=installed \
    appcenter/apps/$APPID/version=1.0

During upgrade, we need to register those apps that were installed in 4.0.

We could do it in a dedicated script that knows about both methods in 4.1, in an errata update for 4.0-3. Maybe in a preup.sh?
Comment 1 Stefan Gohmann univentionstaff 2015-10-14 07:13:35 CEST
It looks like r64428 breaks the App registration. Several updater tests failed after updating to 4.1:

The update to UCS 4.1 is blocked because the components 'audriga-groupware-migration_20131216', 'openvpn4ucs_20140808', 'horde_20131118', 'ucc_20140617', 'xrdp', 'univention-demoapp', 'owncloud7', 'ucsschool_20140827', 'plucs_20140203', 'simplesamlphp_20140304', 'drbd_20140903', 'zarafa_20140828', 'z-push_20140325', 'sep-sesam_20141028', 'uvmm-ec2' are marked as required.


These Apps haven't been installed on the system. See for example 
 http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-0/job/Autotest%20MultiEnv/SambaVersion=s3,Systemrolle=master/59/

From the config regplog:
2015-10-14 01:07:12: set repository/online/component/z-push_20140325/localmirror=false old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/openvpn4ucs_20140808/version=current old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/uvmm-ec2/description='Amazon EC2 cloud connection' old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/sep-sesam_20141028=enabled old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/horde_20131118/version=current old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/plucs_20140203=enabled old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/univention-demoapp/server=appcenter.software-univention.de old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/openvpn4ucs_20140808/server=appcenter.software-univention.de old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/xrdp/description='RDP Server (xrdp)' old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/openvpn4ucs_20140808/description='OpenVPN 4 UCS' old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/z-push_20140325/version=current old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/plucs_20140203/localmirror=false old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/ucc_20140617/server=appcenter.software-univention.de old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/horde_20131118/server=appcenter.software-univention.de old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/audriga-groupware-migration_20131216/localmirror=false old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/owncloud7/server=appcenter.software-univention.de old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/xrdp/localmirror=false old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/owncloud7/version=current old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/openvpn4ucs_20140808=enabled old:[Previously undefined]
2015-10-14 01:07:12: set repository/online/component/audriga-groupware-migration_20131216=enabled old:[Previously undefined]

I've disabled /usr/share/univention-appcenter-register-40-to-41 in one update test and the problem didn't occur.
Comment 2 Dirk Wiesenthal univentionstaff 2015-10-16 11:36:38 CEST
Fixed with
  /usr/share/univention-appcenter/univention-appcenter-register-40-to-41
Comment 3 Stefan Gohmann univentionstaff 2015-10-27 12:16:18 CET
I've updated a system with dudle installed. After the upgrade dudle was not registered:

root@master401:~# ucr search --brief appcenter/apps
appcenter/apps/nagios/status: installed
appcenter/apps/nagios/version: 3.2
appcenter/apps/samba4/status: installed
appcenter/apps/samba4/version: 4.1
appcenter/apps/simplesamlphp/status: installed
appcenter/apps/simplesamlphp/version: 1.3
root@master401:~# /usr/share/univention-appcenter/univention-appcenter-register-40-to-41
Re-registering dudle!
Re-registering nagios!
Re-registering samba4!
File: /etc/univention/service.info/services/univention-appcenter.cfg
File: /etc/univention/service.info/services/univention-appcenter.cfg
File: /etc/univention/service.info/services/univention-appcenter.cfg
File: /var/www/ucs-overview/entries.json
root@master401:~# ucr search --brief appcenter/apps
appcenter/apps/dudle/status: installed
appcenter/apps/dudle/version: 1.0.0-2
appcenter/apps/nagios/status: installed
appcenter/apps/nagios/version: 3.2
appcenter/apps/samba4/status: installed
appcenter/apps/samba4/version: 4.1
appcenter/apps/simplesamlphp/status: installed
appcenter/apps/simplesamlphp/version: 1.3
root@master401:~#
Comment 4 Stefan Gohmann univentionstaff 2015-10-27 12:16:42 CET
Created attachment 7226 [details]
updater.log
Comment 5 Dirk Wiesenthal univentionstaff 2015-10-27 22:21:20 CET
I have completely removed the script. With Bug#39587 fixed, this is not needed anymore.
Comment 6 Stefan Gohmann univentionstaff 2015-10-28 10:15:56 CET
(In reply to Dirk Wiesenthal from comment #5)
> I have completely removed the script. With Bug#39587 fixed, this is not
> needed anymore.

OK, it has been removed. I've also removed the bug number from the changelog.
Comment 7 Stefan Gohmann univentionstaff 2015-11-17 12:12:18 CET
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".