Univention Bugzilla – Bug 53578
App Settings broken for installation
Last modified: 2021-07-21 10:49:44 CEST
example relution io, this app has a required settings for the installation app installation fails 10290 actions.configure 21-07-14 12:10:23 [ INFO]: Configuring relution=5.3 10290 settings 21-07-14 12:10:23 [ INFO]: Setting HOSTNAME to 'https://master.five.new' 10290 actions.configure 21-07-14 12:10:23 [CRITICAL]: Failed to configure: Relution: SYSTEM_ADMIN_PASSWORD is required 10290 actions.configure.progress 21-07-14 12:10:23 [ DEBUG]: 100 10290 packages 21-07-14 12:10:23 [ DEBUG]: Releasing LOCK 10290 actions.install 21-07-14 12:10:23 [CRITICAL]: Failed to configure: Relution: SYSTEM_ADMIN_PASSWORD is required 10290 actions.install 21-07-14 12:10:23 [ WARNING]: Aborting... 10290 actions.remove 21-07-14 12:10:23 [ DEBUG]: Calling remove although SYSTEM_ADMIN_PASSWORD has been set during the installation UMC json {"options":{"apps":["relution"],"auto_installed":[],"action":"install","hosts":{"master.five.new":["relution"]},"settings":{"relution":{"HOSTNAME":"https://master.five.new","SYSTEM_ADMIN_PASSWORD":"univention","ORGA_NAME":"Orga1","ORGA_FULLNAME":"Organisation 1","ORGA_REPLYTOMAIL":"relution@master.five.new","ORGA_CONTACT_NAME":"Relution Support","ORGA_CONTACT_EMAIL":"relution@master.five.new","ORGA_ADMIN_USERNAME":"admin","ORGA_ADMIN_PASSWORD":"univention","ORGA_ADMIN_GIVENNAME":"admin","ORGA_ADMIN_SURNAME":"admin","ORGA_ADMIN_EMAIL":"orgaadmin@master.five.new","SMTP_HOST":"localhost","SMTP_PORT":"25","SMTP_USERNAME":"","SMTP_PASSWORD":"","SMTP_SSL":false,"SMTP_TTLS":false}},"dry_run":false}} -> SYSTEM_ADMIN_PASSWORD is set, OK But Configure.main.args.set_vars in the backend is set_vars = { 'relution': { 'HOSTNAME': 'https://master.five.new', 'SYSTEM_ADMIN_PASSWORD': 'univention', ... 'ORGA_ADMIN_USERNAME': 'admin', 'ORGA_ADMIN_PASSWORD': 'univention', 'ORGA_ADMIN_GIVENNAME': 'admin', 'ORGA_ADMIN_SURNAME': 'admin', ... 'SMTP_TTLS': False }, 'HOSTNAME': 'https://master.five.new', 'SYSTEM_ADMIN_PASSWORD': None, 'ORGA_NAME': 'Orga1', 'ORGA_FULLNAME': 'Organisation 1', 'ORGA_REPLYTOMAIL': 'relution@master.five.new', 'ORGA_CONTACT_NAME': 'Relution Support', 'ORGA_CONTACT_EMAIL': 'relution@master.five.new', 'ORGA_ADMIN_USERNAME': None, 'ORGA_ADMIN_PASSWORD': None, 'ORGA_ADMIN_GIVENNAME': None, 'ORGA_ADMIN_SURNAME': None, 'ORGA_ADMIN_EMAIL': 'orgaadmin@master.five.new', 'SMTP_HOST': 'localhost', 'SMTP_PORT': '25', 'SMTP_USERNAME': None, 'SMTP_PASSWORD': None, 'SMTP_SSL': 'False', 'SMTP_TTLS': 'False', 'docker/host/name': 'master.five.new', 'ldap/hostdn': 'cn=relut-02811855,cn=memberserver,cn=computers,dc=five,dc=new', ... } All "configured" settings are within the key "relution" and the other settings are just the defaults, and these "defaults" are used
settings in the UMC backend is now a dict with { app_id: { setting=val setting=val } } and _run_local just passes this dict as set_vars to action.call, but action.call wants a settings dict like { setting=val setting=val } so a simple fix could be diff --git a/management/univention-appcenter/umc/python/appcenter/__init__.py b/management/univention-appcenter/umc/python/appcenter/__init__.py index 2c917a1084..1f9fe4b28b 100644 --- a/management/univention-appcenter/umc/python/appcenter/__init__.py +++ b/management/univention-appcenter/umc/python/appcenter/__init__.py @@ -320,8 +320,9 @@ class Instance(umcm.Base, ProgressMixin): 'noninteractive': True, 'auto_installed': auto_installed, 'skip_checks': ['shall_have_enough_ram', 'shall_only_be_installed_in_ad_env_with_password_service', 'must_not_have_concurrent_operation'], - 'set_vars': settings, } + if settings.get(app.id): + kwargs['set_vars'] = settings[app.id] if action == 'install': progress.title = _('Installing %s') % (app.name,) elif action == 'remove':
https://git.knut.univention.de/univention/ucs/-/issues/652
969253952e94ac2f9e3dc6f5327b8a0be689154f - univention-appcenter d08befda660e626376ec5e6064bec66546080482 - yaml
Installation of Apps with settings now works (Wekan, Relution) and gives correct values in "univention-app configure wekan --list". YAML: OK
<https://errata.software-univention.de/#/?erratum=5.0x51>