Bug 53677 - New configure call (to configure settings before installation) breaks cmd installation and app tests
New configure call (to configure settings before installation) breaks cmd ins...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-8-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-08-19 11:29 CEST by Dirk Wiesenthal
Modified: 2021-08-25 17:46 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Workaround is available
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 2021-08-19 11:29:49 CEST
+++ This bug was initially created as a clone of Bug #53630 +++

Fix for 4.4

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

This change breaks the univentio-app install call. Not sure what the problem is but is seems that the default values are not respected. This is only a problem for univention-app install (withou any settings) and for our jenkins test (umc-command call). UMC AppCenter installation always send the defaults to the backend, so no problem there.

8.0.11-148A~4.4.0.202107270037

-> univention-app install zammad
Going to install Zammad (3.6.0-42)
Password for Administrator: 
Cannot use None for zammad/what-hostname
Cannot use None for zammad/port-setting
Cannot use None for zammad/certificate-type
Configuring zammad=3.6.0-42
Unsetting zammad/certificate
Unsetting zammad/hostname
Unsetting zammad/certkey
Failed to configure: Zammad: zammad/certificate-type: None is not a valid option
Going to remove Zammad (3.6.0-42)


8.0.11-146A~4.4.0.202103041132
-> univention-app install zammad
OK

[zammad/what-hostname]
Type = List
Description = Change this setting if you want to use a custom hostname.
Description[de] = Ändere diese Einstellung, wenn du einen eigenen Hostnamen verwenden möchtest.
Show = Install, Settings
Values = hdefault, hcustom
Labels = Default UCS-Hostname, Custom Hostname (specify below)
Labels[de] = Standard UCS-Hostname, Eigener Hostname (unten definieren)
InitialValue = hdefault
Group = Hostname and Port
Group[de] = Hostname und Port
Scope = outside

Nevertheless we need to fix this, at least for our jenkins App tests.

also 5.0-0
Comment 1 Dirk Wiesenthal univentionstaff 2021-08-19 11:52:45 CEST
Fixed with
[4.4-8 77919de16c] Bug #53677: Fix App installation with certain App Settings
 2 files changed, 9 insertions(+), 2 deletions(-)

Package: univention-appcenter
Version: 8.0.11-149A~4.4.0.202108191153
Branch: ucs_4.4-0
Scope: errata4.4-8
Comment 2 Felix Botner univentionstaff 2021-08-25 09:46:18 CEST
doesn't work, i still get 

Failed to configure: Zammad: zammad/certificate-type: None is not a valid option


and if i remove the try/except in _get_configure_settings i get

-> TypeError: get_initial_value() got an unexpected keyword argument 'phase'

-> python/appcenter/settings.py:	def get_initial_value(self, app):


also if that setting.get_initial_value() returns None (i guess in case there is no default value), do we really need to set this value?
Comment 3 Dirk Wiesenthal univentionstaff 2021-08-25 10:26:36 CEST
Fixed typo in

Package: univention-appcenter
Version: 8.0.11-150A~4.4.0.202108250957
Branch: ucs_4.4-0
Scope: errata4.4-8
Comment 4 Dirk Wiesenthal univentionstaff 2021-08-25 10:27:54 CEST
(In reply to Felix Botner from comment #2)
> also if that setting.get_initial_value() returns None (i guess in case there
> is no default value), do we really need to set this value?

None is not going to be set. For env (docker), it is ignored. For ucr (Scope=outside), it is unset (but it won't have been set before).
Comment 5 Felix Botner univentionstaff 2021-08-25 11:29:41 CEST
OK - default values are set 
OK - yaml