Bug 31662 - second app center instance fails during app installation in first instance
second app center instance fails during app installation in first instance
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Dirk Wiesenthal
Alexander Kläser
:
Depends on:
Blocks: singleton
  Show dependency treegraph
 
Reported: 2013-06-05 21:01 CEST by Ingo Steuwer
Modified: 2013-07-10 14:18 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
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):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Steuwer univentionstaff 2013-06-05 21:01:12 CEST
UCS 3.1-1 Errata 119

While installing Zarafa in one App Center, I started another App center module instance in the same browser/UMC which resultet in the following traceback:

Die Ausführung des Kommandos appcenter/packages/sections ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 282, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 384, in _response
    for res in function(self, iterator, *nones):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 266, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/appcenter/__init__.py", line 293, in packages_sections
    for package in self.package_manager.packages():
  File "/usr/lib/pymodules/python2.6/univention/lib/package_manager.py", line 478, in packages
    for pkg in self.cache:
  File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 173, in __iter__
    yield self[pkgname]
  File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 161, in __getitem__
    raise KeyError('The cache has no package named %r' % key)
KeyError: "The cache has no package named 'libxss1'"
Comment 1 Alexander Kläser univentionstaff 2013-06-11 12:34:11 CEST
We could make sure that only one App Center tab is opened simultaneously (as in UCS@school computerroom). Would that be an option?
Comment 2 Ingo Steuwer univentionstaff 2013-06-11 12:42:29 CEST
(In reply to Alexander Kläser from comment #1)
> We could make sure that only one App Center tab is opened simultaneously (as
> in UCS@school computerroom). Would that be an option?

yes, no concerns on my side.
Comment 3 Dirk Wiesenthal univentionstaff 2013-06-28 16:30:11 CEST
Fixed in
  univention-management-console-module-appcenter 2.0.139-14.143.201306281536
and
  univention-management-console-module-appcenter 3.0.1-1.144.201306281606

YAML: 2013-06-28-univention-management-console-module-appcenter.yaml
Changelog updated
Comment 4 Alexander Kläser univentionstaff 2013-07-03 12:36:38 CEST
As discussed, the problem seems to happen as appcenter/packages/section is accessing the same PackageManager instance which is installing the app. My guess would be that the iterator object is invalidated due to an cache update.

Suggestion: appcenter/packages/section should open a separate apt.Cache instance to iterate over the packages and determine all sections. From my understanding, this will not interfere with the running PackageManager as the Cache is loaded completely into memory (I tested it with two different Cache instances and differing repositories).
Comment 5 Dirk Wiesenthal univentionstaff 2013-07-05 13:16:29 CEST
(In reply to Alexander Kläser from comment #4)
> Suggestion: appcenter/packages/section should open a separate apt.Cache

Done in
  univention-management-console-module-appcenter 2.0.139-15.147.201307051308
and
  univention-management-console-module-appcenter 3.0.3-1.146.201307051305
Comment 6 Alexander Kläser univentionstaff 2013-07-05 13:45:33 CEST
I could not reproduce the traceback and the module can only be opened once now (→ see also Bug 31855).

Erratum changes → OK
YAML file → OK
3.2 changes → OK
3.2 changelog → FAIL, needs to be adapted
Comment 7 Alexander Kläser univentionstaff 2013-07-05 14:18:01 CEST
(In reply to Alexander Kläser from comment #6)
> I could not reproduce the traceback and the module can only be opened once
> now (→ see also Bug 31855).
> 
> Erratum changes → OK
> YAML file → OK
> 3.2 changes → OK
> 3.2 changelog → FAIL, needs to be adapted

I adapted the changelog entry.
Comment 8 Moritz Muehlenhoff univentionstaff 2013-07-10 14:18:26 CEST
http://errata.univention.de/ucs/3.1/146.html