Bug 44502 - KeyError: 'UNIVENTION_APP_IDENTIFIER'
KeyError: 'UNIVENTION_APP_IDENTIFIER'
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-2-errata
Assigned To: Felix Botner
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-28 13:40 CEST by Florian Best
Modified: 2017-10-18 12:02 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.137
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017042821000334, 2017081921000317, 2017090421000174
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-04-28 13:40:52 CEST
Version: 4.2-0 errata4 (Lesum)

Remark: Upgrade von UCS 4.1 auf 4.2 und anschliessender Versuch der Installation von Nextcloud.

Die Ausführung des Kommandos appcenter/docker/progress ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 249, in execute
    function.__func__(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 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 375, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 227, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 233, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 70, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 110, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 67, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/install.py", line 85, in _do_it
    self._register_attributes(app, args)
  File "%PY2.7%/univention/appcenter/actions/register.py", line 224, in _register_attributes
    del os.environ['UNIVENTION_APP_IDENTIFIER']
  File "/usr/lib/python2.7/os.py", line 498, in __delitem__
    del self.data[key]
KeyError: 'UNIVENTION_APP_IDENTIFIER'
Comment 1 Dirk Wiesenthal univentionstaff 2017-06-29 09:58:00 CEST
We can prevent the traceback by catching the KeyError. But I really don't know how this can happen. From the code:

os.environ['UNIVENTION_APP_IDENTIFIER'] = app.id
try:
  [...]
finally:
  del os.environ['UNIVENTION_APP_IDENTIFIER']
Comment 2 Florian Best univentionstaff 2017-08-21 11:19:11 CEST
Version: 4.1-4 errata471 (Vahr)

Remark: Upgrade von Owncloud 9.1 auf 10 schlägt fehl
Comment 3 Florian Best univentionstaff 2017-09-15 11:41:04 CEST
Version: 4.2-1 errata157 (Lesum)
Comment 4 Felix Botner univentionstaff 2017-09-25 13:29:44 CEST
(In reply to Dirk Wiesenthal from comment #1)
> We can prevent the traceback by catching the KeyError. But I really don't
> know how this can happen. From the code:
me neither, added a check before deleting UNIVENTION_APP_IDENTIFIER but i guess there is a more underlying problem here ...

univention-appcenter 6.0.10-9A~4.2.0.201709251301
Comment 5 Dirk Wiesenthal univentionstaff 2017-09-26 12:04:01 CEST
OK: Code review
Comment 6 Arvid Requate univentionstaff 2017-10-18 12:02:44 CEST
<http://errata.software-univention.de/ucs/4.2/199.html>