Bug 43496 - Enable App Center to use ini files from other UCS versions
Enable App Center to use ini files from other UCS versions
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Dirk Wiesenthal
Felix Botner
: interim-2
Depends on: 43662
Blocks: 43709
  Show dependency treegraph
 
Reported: 2017-02-05 23:59 CET by Dirk Wiesenthal
Modified: 2017-04-04 18:28 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Feature Request
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
30_installed.log (237.70 KB, text/plain)
2017-03-11 21:18 CET, Stefan Gohmann
Details
config-registry.replog (5.42 KB, text/plain)
2017-03-11 21:18 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 2017-02-05 23:59:25 CET
We should allow Docker Apps to be installable by different UCS versions.

SupportedUCSVersions=4.1-4 errata350, 4.2-0

should replace

RequiredUCSVersion=

UCRV 
ucr set appcenter/server="4.2@appcenter.software-univention.de 4.1@appcenter.software-univention.de"

should replace

ucr set repository/app_center/server=appcenter.software-univention.de
Comment 1 Dirk Wiesenthal univentionstaff 2017-02-06 00:56:21 CET
Added in
  univention-appcenter 6.0.1-11A~4.2.0.201702060056

root@master50:~# univention-app get samba4 ucs_version
ucs_version: 4.2
root@master50:~# univention-app get 4.1/samba4 ucs_version
ucs_version: 4.1
root@master50:~# univention-app get 4.2/samba4 ucs_version
ucs_version: 4.2
Comment 2 Dirk Wiesenthal univentionstaff 2017-02-06 01:02:57 CET
Every UCS_VERSION@APPCENTER_SERVER has its own directory

/var/cache/univention-appcenter/APPCENTER_SERVER/UCS_VERSION

Some files are downloaded multiple times (categories.ini, etc). Not sure whether optimizing this is worth it.
Comment 3 Stefan Gohmann univentionstaff 2017-02-06 06:16:22 CET
(In reply to Dirk Wiesenthal from comment #0)
> UCRV 
> ucr set appcenter/server="4.2@appcenter.software-univention.de
> 4.1@appcenter.software-univention.de"
> 
> should replace
> 
> ucr set repository/app_center/server=appcenter.software-univention.de

Do we need this UCR variable change? That means we have to overwrite the variable in old releases if we release new UCS versions, right?
Comment 4 Dirk Wiesenthal univentionstaff 2017-03-01 02:47:23 CET
ucr set appcenter/server=appcenter-test.software-univention.de is enough for 4.2 and 4.1:

  http://appcenter-test.software-univention.de/meta-inf/ucs.ini
Comment 5 Felix Botner univentionstaff 2017-03-01 16:26:03 CET
* Why was repository/app_center/server removed?

* Why is appcenter/server set to appcenter during the update although
  repository/app_center/server was appcenter-test?

2017-03-01 12:43:11: unset 'repository/app_center/server' old:appcenter-test.software-univention.de
2017-03-01 12:43:11: set appcenter/server=appcenter.software-univention.de old:[Previously undefined]

* Why do we need 4 status vars to determine the status of an app?
   (server, status, ucs, version)
  And why are at least ucs and server checked against the cache?
  This means if i install an app with appcenter/server=appcenter-test and then
  switch back to appcenter univention-app info does no longer list this
  app as installed, ?!?, BUT THE APP IS INSTALLED
  What is the point of all those checks and vars if at the end the app status
  is wrong?

* Update is broken, after an update from 4.1 to 4.2 with two docker apps
  univention-app info is empty (because ucs and server are missing)
Comment 6 Dirk Wiesenthal univentionstaff 2017-03-03 04:46:26 CET
(In reply to Felix Botner from comment #5)
> * Why was repository/app_center/server removed?

Because the new variable appcenter/server is different in that it may hold multiple values. I thought it would be correct to switch names in this case.

> 
> * Why is appcenter/server set to appcenter during the update although
>   repository/app_center/server was appcenter-test?

This has been fixed.

> 
> 2017-03-01 12:43:11: unset 'repository/app_center/server'
> old:appcenter-test.software-univention.de
> 2017-03-01 12:43:11: set appcenter/server=appcenter.software-univention.de
> old:[Previously undefined]
> 
> * Why do we need 4 status vars to determine the status of an app?
>    (server, status, ucs, version)
>   And why are at least ucs and server checked against the cache?
>   This means if i install an app with appcenter/server=appcenter-test and
> then
>   switch back to appcenter univention-app info does no longer list this
>   app as installed, ?!?, BUT THE APP IS INSTALLED
>   What is the point of all those checks and vars if at the end the app status
>   is wrong?

Strictly speaking, the App status is not wrong. You installed the App from a different server, maybe with different packages. If you installed it from "appcenter-test...", asking the App Center whether it is the very App in "appcenter..." should arguably return False.

I may end up removing the check, though. Should be discussed.

> 
> * Update is broken, after an update from 4.1 to 4.2 with two docker apps
>   univention-app info is empty (because ucs and server are missing)

I have opened Bug#43709
Comment 7 Felix Botner univentionstaff 2017-03-06 17:11:36 CET
We have to rethink the changes here (see mail).

What i want to point out are the following problems:
 * all docker tests fail (because they set repository/appcenter/server instead 
   of the new ucr var)
 * update - we have to prepare all 4.1 docker app installations for 4.2
 * Currently UMC App installations is broken because of the new cache dir 
    structure, UMC only looks in the old cache dir
Comment 8 Dirk Wiesenthal univentionstaff 2017-03-07 02:24:12 CET
univention-appcenter 6.0.1-51A~4.2.0.201703070222

* Re-renamed the UCRV
* Added multiple all.tar.gz files for as many pre-filled caches as you like
* Fixed the UMC cache dir (hopefully)
Comment 9 Stefan Gohmann univentionstaff 2017-03-11 21:17:23 CET
It looks like the registration variable is no longer set correctly. The test case 80_docker/30_installed fails because the the variable is set false.

Attached you can find the log output of the test case and the corresponding UCR replog.
Comment 10 Stefan Gohmann univentionstaff 2017-03-11 21:18:07 CET
Created attachment 8518 [details]
30_installed.log
Comment 11 Stefan Gohmann univentionstaff 2017-03-11 21:18:25 CET
Created attachment 8519 [details]
config-registry.replog
Comment 12 Dirk Wiesenthal univentionstaff 2017-03-14 01:16:49 CET
I have removed the code that registered and used the server of an App. Only repository/app_center/server is used and only one server may be specified there.

Multiple UCS versions still work, of course.

univention-appcenter (6.0.3-6)
Comment 13 Dirk Wiesenthal univentionstaff 2017-03-17 02:23:14 CET
(In reply to Stefan Gohmann from comment #9)
> It looks like the registration variable is no longer set correctly. The test
> case 80_docker/30_installed fails because the the variable is set false.
> 
> Attached you can find the log output of the test case and the corresponding
> UCR replog.

This will be fixed along with Bug#40064
Comment 14 Felix Botner univentionstaff 2017-03-21 16:37:22 CET
OK
Comment 15 Stefan Gohmann univentionstaff 2017-03-24 07:30:58 CET
(In reply to Dirk Wiesenthal from comment #13)
> (In reply to Stefan Gohmann from comment #9)
> > It looks like the registration variable is no longer set correctly. The test
> > case 80_docker/30_installed fails because the the variable is set false.
> > 
> > Attached you can find the log output of the test case and the corresponding
> > UCR replog.
> 
> This will be fixed along with Bug#40064

Bug #40064 has been moved to 4.2-0-errata. So, this issue is still open and needs to be fixed.
Comment 16 Dirk Wiesenthal univentionstaff 2017-03-24 12:17:41 CET
I have opened Bug#44065 for that
Comment 17 Stefan Gohmann univentionstaff 2017-04-04 18:28:28 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".