Bug 40064 - UMC App Center should install non docker apps with new library
UMC App Center should install non docker apps with new library
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 4.1
Other All
: P5 normal (vote)
: UCS 4.3
Assigned To: Dirk Wiesenthal
Felix Botner
: interim-2
: 31404 35198 38633 40308 (view as bug list)
Depends on: 41039 41823 42580
Blocks: 43660 43661 46474
  Show dependency treegraph
 
Reported: 2015-11-23 08:16 CET by Dirk Wiesenthal
Modified: 2018-03-14 14:37 CET (History)
5 users (show)

See Also:
What kind of report is it?: Development Internal
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): Cleanup
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-11-23 08:16:05 CET
Currently, the UMC App Center installs, updates, uninstalls non-docker Apps with the old Application class.

It should instead use the new App class.

Some work still has to go into these functions, but it would be far better to use them.

No double bug fixing when a dysfunctional routine is implemented in both classes.

Support of docker features like a preinst script without additional implementation effort.

Startup speed increases as the App cache only needs to be loaded once.

The following things do not work at the moment:
Dry run - there is no package list to get before installing an app.
Connection to other hosts is currently done via "ssh univention-app ...". This may be a problem for non 4.1 systems.

univention-app installs directly via apt-get, not with the PackageManager class. This should not make a difference, yet it needs to be tested thoroughly.
Comment 1 Florian Best univentionstaff 2016-04-19 09:22:35 CEST
*** Bug 31404 has been marked as a duplicate of this bug. ***
Comment 2 Florian Best univentionstaff 2016-04-19 09:22:43 CEST
*** Bug 35198 has been marked as a duplicate of this bug. ***
Comment 3 Dirk Wiesenthal univentionstaff 2016-10-19 10:50:27 CEST
*** Bug 38633 has been marked as a duplicate of this bug. ***
Comment 4 Dirk Wiesenthal univentionstaff 2016-10-28 13:04:41 CEST
*** Bug 40308 has been marked as a duplicate of this bug. ***
Comment 5 Dirk Wiesenthal univentionstaff 2018-02-09 12:51:48 CET
I have merged the changes to 4.3-0.

TODO:
 * The Progress bar may need some adjustments but I wanted to merge now for better overall test results
 * Remove univention-add-app everywhere (test scripts, etc.)
 * Remove old imports everywhere

I have also adjusted ucs-test:
  First of all, I fixed the os.getcwd() error in some test cases by not staying in the build directory for packages. These get deleted, therefore we got the infamous OSError "no such file or directory".
  79_umc_broken_failure_error_exit_code was simplified. The old code left broken installations in place. The new code uninstalls the broken App. I thought it would be better to put effort in changing the test instead of changing the new behaviour as I find it better.

On a side note we need to adjust the *umc* tests once we are sure that there are no regressions to 4.2. They are hard to read, not very verbose in case of an error and some of them do not clean up after them.
Comment 6 Felix Botner univentionstaff 2018-02-13 12:01:00 CET
I can't see any logs regarding the package installation.
Comment 7 Felix Botner univentionstaff 2018-02-16 13:01:14 CET
80_docker.67_app_installation_fails_with_missing_package.test could be a regression

-> univention-app install r38dgxg38n
Going to install r38dgxg38n (2.8.5)
Creating data directories for r38dgxg38n...
Registering UCR for r38dgxg38n
Marking 4.1/r38dgxg38n=2.8.5 as installed
Adding localhost to LDAP object
Reloading apache2 configuration (via systemctl): apache2.service.
Registering component for 4.1/r38dgxg38n=2.8.5
foobar: Paket existiert nicht
...

-> echo $?
0

67_app_installation_fails_with_missing_package.test expects univention-app to return != 0 if the package does not exist
Comment 8 Felix Botner univentionstaff 2018-02-19 18:07:23 CET
what is this

 26444 actions.update                   18-02-19 18:06:28 [   DEBUG]: Removing old files...
 26444 actions.update                   18-02-19 18:06:28 [   DEBUG]: Unpacking /var/cache/univention-appcenter/appcenter-test.software-univention.de/4.1/.all.tar...
 26444 actions.update                   18-02-19 18:06:29 [   DEBUG]: Calling tar -C /var/cache/univention-appcenter/appcenter-test.software-univention.de/4.1 -xf /var/cache/univention-appcenter/appcenter-test.software-univention.de/4.1/.all.tar
 26444 cache                            18-02-19 18:06:29 [   DEBUG]: Cache outdated. Need to rebuild
 26444 cache                            18-02-19 18:06:29 [   DEBUG]: Unable to get mtime for cache: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/cache/univention-appcenter/appcenter-test.software-univention.de/4.3/.apps.de.json'
 26444 cache                            18-02-19 18:06:29 [   DEBUG]: Cannot load cache: mtimes of cache files do not match: None < 1519059985.744
 26444 cache                            18-02-19 18:06:29 [   DEBUG]: Saved 30 apps into cache
 26444 cache                            18-02-19 18:06:29 [   DEBUG]: Cache outdated. Need to rebuild
 26444 cache                            18-02-19 18:06:29 [   DEBUG]: Unable to get mtime for cache: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/cache/univention-appcenter/appcenter-test.software-univention.de/4.2/.apps.de.json'
 26444 cache                            18-02-19 18:06:29 [   DEBUG]: Cannot load cache: mtimes of cache files do not match: None < 1519059987.428
 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed




 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed
 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed

 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed

 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed

 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed


 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed

 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed




 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed


 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed

 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed
 26444 apps                             18-02-19 18:06:29 [ WARNING]: Not allowed
 26444 apps                             18-02-19 18:06:30 [ WARNING]: Not allowed
 26444 apps                             18-02-19 18:06:30 [ WARNING]: Not allowed
 26444 apps                             18-02-19 18:06:30 [ WARNING]: Not allowed
 26444 apps                             18-02-19 18:06:30 [ WARNING]: Not allowed
 26444 apps                             18-02-19 18:06:30 [ WARNING]: Not allowed
Comment 9 Dirk Wiesenthal univentionstaff 2018-02-19 21:31:47 CET
This is two new Caches (one for 4.3, one for 4.2), followed by warnings regarding an App in the Test App Center that does not have correct Categories defined. (I know this because I debugged it. It is indeed not clear from the Logs)
Comment 10 Felix Botner univentionstaff 2018-02-21 20:59:01 CET
all docker and some appcenter jenkins tests fail with

(2018-02-21 10:54:58.113178) dpkg-genchanges: Information: Binärpaket(e) hochzuladen (kein Quellcode enthalten)
(2018-02-21 10:54:58.117505)  dpkg-source --after-build u5p3clu5nw
(2018-02-21 10:55:28.639167) W: The repository 'http://master090.autotest090.local/univention-repository/4.3/maintained/component vdhyafql0y_0.7.0/all/ Release' does not have a Release file.
(2018-02-21 10:55:51.546324) Failed to uninstall the App
(2018-02-21 10:55:51.546536) Aborting...
(2018-02-21 10:56:03.822805) Traceback (most recent call last):
(2018-02-21 10:56:03.822902)   File "91_additional_packages", line 108, in <module>
(2018-02-21 10:56:03.823007)     create_app()
(2018-02-21 10:56:03.823060)   File "91_additional_packages", line 101, in create_app
(2018-02-21 10:56:03.823151)     app.uninstall()
(2018-02-21 10:56:03.823202)   File "/usr/share/ucs-test/80_docker/dockertest.py", line 377, in uninstall
(2018-02-21 10:56:03.823322)     raise UCSTest_DockerApp_RemoveFailed()
(2018-02-21 10:56:03.823461) dockertest.UCSTest_DockerApp_RemoveFailed
Comment 11 Dirk Wiesenthal univentionstaff 2018-02-22 15:58:51 CET
Fixed in
  univention-appcenter 7.0.1-16A~4.3.0.201802221554
Comment 13 Dirk Wiesenthal univentionstaff 2018-02-26 12:58:35 CET
Fixed it in ucs-test. The problem was that an earlier test did not clean up its repository. But the local App Center was removed, so we got 404 and apt-get update returned with non-zero.

This is a consequence of aborting when the uninstallation of an App fails. I still think it is fine.
Comment 14 Felix Botner univentionstaff 2018-02-26 16:46:09 CET
something is wrong with the progress bar

If i install etherpad via UMC i get at some point in progress bar, now i open a second umc appcenter and try to install squid, i get an error "running package management" and a button to display the progress bar from already running operation. 

But on the second UMC connection it never loads the progress bar and on the first UMC connection the progress bar disappears and the "install app" page is displayed (as if the app is not installed).

The actual installation worked, after closing and re-opening the UMC appcenter the app is installed.

Is this relevant?
Maybe open another Bug?
Comment 15 Dirk Wiesenthal univentionstaff 2018-02-26 19:43:06 CET
This is Bug#35179
Comment 16 Felix Botner univentionstaff 2018-02-27 17:14:09 CET
OK
Comment 17 Stefan Gohmann univentionstaff 2018-03-14 14:37:43 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

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