Bug 42527 - Database integration does not work for Non-UCS images
Database integration does not work for Non-UCS images
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-3-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-28 14:42 CEST by Dirk Wiesenthal
Modified: 2018-10-04 11:27 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018100321000537, 2017090221000249
Bug group (optional):
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 2016-09-28 14:42:40 CEST
ucr cannot be found, falling back to changing the database file
directly
'int' object has no attribute 'replace'
Traceback (most recent call last):
  File
"/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py"
, line 189, in call_with_namespace
    result = self.main(namespace)
  File
"/usr/lib/pymodules/python2.7/univention/appcenter/actions/configure.py
", line 87, in main
    self._set_config(args.app, set_vars)
  File
"/usr/lib/pymodules/python2.7/univention/appcenter/actions/configure.py
", line 165, in _set_config
    self._set_config_via_tool(app, set_vars)
  File
"/usr/lib/pymodules/python2.7/univention/appcenter/actions/configure.py
", line 189, in _set_config_via_tool
    self._set_config_directly(app, set_vars)
  File
"/usr/lib/pymodules/python2.7/univention/appcenter/actions/configure.py
", line 181, in _set_config_directly
    _ucr.save()
  File
"/usr/lib/pymodules/python2.7/univention/config_registry/backend.py",
line 401, in save
    self.__save_file(filename)
  File
"/usr/lib/pymodules/python2.7/univention/config_registry/backend.py",
line 369, in __save_file
    reg_file.write(self.__str__())
  File
"/usr/lib/pymodules/python2.7/univention/config_registry/backend.py",
line 442, in __str__
    key, val in sorted(self.items())])
  File
"/usr/lib/pymodules/python2.7/univention/config_registry/backend.py",
line 436, in remove_invalid_chars
    seq = seq.replace(letter, '')
AttributeError: 'int' object has no attribute 'replace'
Comment 1 Dirk Wiesenthal univentionstaff 2016-09-28 14:48:37 CEST
Installation does not work. Please support None (remove variable) and everything else (as string)
Comment 2 Dirk Wiesenthal univentionstaff 2016-09-28 15:28:36 CEST
The problem is a naive:

  _ucr[key] = value

in python/appcenter-docker/actions/configure.py
Comment 3 Florian Best univentionstaff 2016-09-28 20:45:40 CEST
Also broken on a regular UCS 4.2 System: I can't open the appcenter anymore.

Die Ausführung des Kommandos appcenter/query ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 283, in execute
    function(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 191, in query
    return domain.to_dict(apps)
  File "%PY2.7%/univention/appcenter/actions/domain.py", line 105, in to_dict
    app_dict = get.to_dict(app)
  File "%PY2.7%/univention/appcenter/actions/docker_get.py", line 47, in to_dict
    ret['config'] = configure.list_config(app)
  File "%PY2.7%/univention/appcenter/actions/configure.py", line 141, in list_config
    advanced = ucr_evaluated_as_true(value)
  File "%PY2.7%/univention/appcenter/ucr.py", line 79, in ucr_evaluated_as_true
    return _UCR.is_true(value=value)
  File "%PY2.7%/univention/config_registry/backend.py", line 252, in is_true
    return value.lower() in ('yes', 'true', '1', 'enable', 'enabled', 'on')
AttributeError: 'bool' object has no attribute 'lower'
Comment 4 Dirk Wiesenthal univentionstaff 2016-10-18 16:24:22 CEST
Fixed in
  univention-appcenter 5.0.22-20.226.201610181622

None and ints are now handled correctly.
Comment 5 Felix Botner univentionstaff 2016-10-18 16:41:21 CEST
OK - fixed in univention-appcenter 5.0.22-20.226.201610181622
OK - yaml
OK - merged to 4.2-0
Comment 6 Janek Walkenhorst univentionstaff 2016-10-19 11:17:24 CEST
<http://errata.software-univention.de/ucs/4.1/293.html>
Comment 7 Florian Best univentionstaff 2017-09-15 11:36:39 CEST
Reported again, 4.1-3 errata295 (Vahr)
Comment 8 Johannes Keiser univentionstaff 2018-10-04 11:27:07 CEST
Reported again: Version: 4.1-3 errata295 (Vahr)

Die Ausführung des Kommandos appcenter/query ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 283, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 191, in query
    return domain.to_dict(apps)
  File "%PY2.7%/univention/appcenter/actions/domain.py", line 105, in to_dict
    app_dict = get.to_dict(app)
  File "%PY2.7%/univention/appcenter/actions/docker_get.py", line 47, in to_dict
    ret['config'] = configure.list_config(app)
  File "%PY2.7%/univention/appcenter/actions/configure.py", line 141, in list_config
    advanced = ucr_evaluated_as_true(value)
  File "%PY2.7%/univention/appcenter/ucr.py", line 79, in ucr_evaluated_as_true
    return _UCR.is_true(value=value)
  File "%PY2.7%/univention/config_registry/backend.py", line 253, in is_true
    return value.lower() in ('yes', 'true', '1', 'enable', 'enabled', 'on')
AttributeError: 'bool' object has no attribute 'lower'