Bug 39587 - Non-docker apps need to be registered, too
Non-docker apps need to be registered, too
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Dirk Wiesenthal
Arvid Requate
: interim-2
Depends on: 39586
Blocks: 39679
  Show dependency treegraph
 
Reported: 2015-10-19 10:54 CEST by Dirk Wiesenthal
Modified: 2015-11-17 12:11 CET (History)
2 users (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

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2015-10-19 10:54:30 CEST
The postinst of each "UCS components" apps' DefaultPackages needs to register itself so that univention-install univention-samba4 actually registers the app.

This is done by:
  univention-app register samba4 --do-it

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

See Bug#39463: Apps now have to be registered explicitely.

As the old Application class is still used to install non-docker apps, the old class needs to register apps so that the new class knows about the installation status.
Comment 1 Stefan Gohmann univentionstaff 2015-10-20 20:45:41 CEST
(In reply to Dirk Wiesenthal from comment #0)
> The postinst of each "UCS components" apps' DefaultPackages needs to
> register itself so that univention-install univention-samba4 actually
> registers the app.
> 
> This is done by:
>   univention-app register samba4 --do-it

What happens during the installation? I guess the app center packages are not available at that point. At least, it is not guaranteed. Maybe the join script is a better place for the registration?
Comment 2 Stefan Gohmann univentionstaff 2015-10-21 14:33:56 CEST
(In reply to Stefan Gohmann from comment #1)
> (In reply to Dirk Wiesenthal from comment #0)
> > The postinst of each "UCS components" apps' DefaultPackages needs to
> > register itself so that univention-install univention-samba4 actually
> > registers the app.
> > 
> > This is done by:
> >   univention-app register samba4 --do-it
> 
> What happens during the installation? I guess the app center packages are
> not available at that point. At least, it is not guaranteed. Maybe the join
> script is a better place for the registration?

As discussed, we should do the following steps:
 - update index.json.gz in the appcenter package
 - run "univention-app update" in the appcenter join script (it should also work without network)
 - remove univention-register-apps 
 - iterate over all UCS components, check if the packages are installed and run "univention-app register APP_ID --do-it" for every APP ID
Comment 3 Dirk Wiesenthal univentionstaff 2015-10-27 22:25:01 CET
Fixed in
  univention-appcenter 5.0.9-5.24.201510272203

Non-docker apps are now recognized based on their package status, not the UCR variables. This may be a bit slower but it is more reliable.

THe UCR variables are still set when registering these apps but they are not really used at the moment.

Registration happens every time the App Center is opened. Or univention-app register is called. This fixes all re-registration (or unregistration) of non-docker apps. It also solves the problem of registering 4.0 apps when upgrading to 4.1
Comment 4 Arvid Requate univentionstaff 2015-10-28 18:19:42 CET
Basically it works. I guesse there one glitch: Apps installed from the commandline are only shown after opening the App Center module the second time (in the same UMC session).

E.g. login to UMC, open App Center, open shell and run "univention-install univention-fetchmail univention-fetchmail-schema", close App Center module, open it again: new App not shown. close App Center module again, open a second time: App is shown.

This is even more irritating in the case where an umc-reload is triggered by the newly installed package. E.g. I installed univention-cups via univention-install and the UMC shows a popup "UMC reload required
A reload of the Univention Management Console is required to use new modules.
Currently opened modules may not work properly.
Do you want to reload the page?", then I click Ok, the UMC reloads, but CUPS is not shown as an installed App.
Comment 5 Dirk Wiesenthal univentionstaff 2015-10-30 12:06:30 CET
Yes, I opened Bug#39679 for this.

I do not see a trivial fix without sacrificing startup speed. My guess is that an installation of these packages via command line (not via App Center or System setup) is uncommon enough to justify fixing it at a later point.
Comment 6 Arvid Requate univentionstaff 2015-11-02 09:54:29 CET
Ok, I agree. Changelog Ok.
Comment 7 Stefan Gohmann univentionstaff 2015-11-17 12:11:46 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".