Bug 43661 - New lib needs to support --dry-run
New lib needs to support --dry-run
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
Depends on: 40064 41039 41823 42580 43660
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-27 18:37 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 2017-02-27 18:37:43 CET
For Non-Docker Apps show Software changes list.
For Docker Apps maybe verify the existence of the Docker Image?

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

We experienced issues with running apt-get in a subprocess. It seems apt-get dislikes that all File descriptors were closed. Also, the Manager allows dry-run.

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

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 Dirk Wiesenthal univentionstaff 2018-02-09 12:52:49 CET
This was fixed along with Bug#40064.
Comment 2 Felix Botner univentionstaff 2018-02-19 17:52:56 CET
preup is executed in dry-run mode, is this OK?

univention-app install --dry-run owncloud
Going to install ownCloud (10.0.4-20171212)
Password for Administrator: 
update LDAP schema...
setting binddn and bindpwdfile
E: object not found
setting directory variables
creating owncloud conf directory
Base configuration for ownCloud
Create owncloud/user/enabled
Create owncloud/group/enabled
Create owncloud/ldap/base
Create owncloud/ldap/loginFilter
Create owncloud/ldap/userFilter
Create owncloud/ldap/groupFilter
Create owncloud/ldap/internalNameAttribute
Create owncloud/ldap/userUuid
Comment 3 Dirk Wiesenthal univentionstaff 2018-02-20 14:52:18 CET
Yes, this is okay. Kind of.

Originally, preinst was meant to do custom checks whether or not the App could be installed. You can change / prepare the environment in it, though.

We have to talk about preinst in general. Here, it is okay. Installing an App but aborting due to network issues also ran the preinst. (Without rolling back)
Comment 4 Felix Botner univentionstaff 2018-02-22 12:00:07 CET
-> univention-app install --dry-run xrdp

(1)

The following packages would be INSTALLED/UPGRADED:
 * install-info
 * install-info (6.3.0.dfsg.1-1+b2 192.168.0.10, Univention Corporate Server:updates-test.software-univention.de
 * desktop-base
 * desktop-base (9.0.2+deb9u1 192.168.0.10
 ...

so every packages is listed twice, once should be enough

(2)

The following packages would be UPGRADED:
 * php-xml-parser
 * php5-common


but the apt-get log in appcenter.log says 

 15094 packages                         18-02-22 11:45:28 [    INFO]: Die folgenden Pakete werden ENTFERNT:
 15094 packages                         18-02-22 11:45:28 [    INFO]:   php-xml-parser php5-common
Comment 5 Dirk Wiesenthal univentionstaff 2018-02-22 15:58:55 CET
Fixed in
  univention-appcenter 7.0.1-16A~4.3.0.201802221554
Comment 6 Felix Botner univentionstaff 2018-02-23 15:21:19 CET
OK
Comment 7 Stefan Gohmann univentionstaff 2018-03-14 14:37:49 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".