Bug 39302 - TypeError in top/query
TypeError in top/query
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Process overview
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-3-errata
Assigned To: Florian Best
Alexander Kramer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-03 11:34 CEST by Florian Best
Modified: 2015-10-01 14:00 CEST (History)
3 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): External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (745 bytes, patch)
2015-09-03 11:37 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-09-03 11:34:57 CEST
Execution of command 'top/query' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/modules/__init__.py", line 176, in _decorated
    return function(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 188, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/top/__init__.py", line 69, in query
    listEntry['command'] = ' '.join(process.cmdline)
TypeError: can only join an iterable

Version:
4.0-1 errata216 (Walle)
Comment 1 Florian Best univentionstaff 2015-09-03 11:37:21 CEST
Created attachment 7155 [details]
patch
Comment 2 Florian Best univentionstaff 2015-09-09 10:02:25 CEST
2015-09-09-univention-management-console-module-top.yaml:
r63547 | YAML Bug #39302

univention-management-console-module-top (4.1.0-6):
r63545 | Bug #39302: fix KeyError in top/query

univention-management-console-module-top (5.0.0-1):
r63546 | Bug #39302: fix KeyError in top/query
Comment 3 Alexander Kramer univentionstaff 2015-09-09 11:00:12 CEST
As discussed I it seems that psutil have changed the api. So some attributes of a process are now functions instead of lists. This explains the TypeError.
Comment 4 Florian Best univentionstaff 2015-09-09 16:08:16 CEST
API changes are documented here: https://github.com/giampaolo/psutil/blob/master/HISTORY.rst

The new version is able to interact with both, psutil 0.9 and 2.0, 2.2, 3.0.
Comment 5 Eduard Mai univentionstaff 2015-09-11 13:13:29 CEST
(In reply to Florian Best from comment #4)
> API changes are documented here:
> https://github.com/giampaolo/psutil/blob/master/HISTORY.rst
> 
> The new version is able to interact with both, psutil 0.9 and 2.0, 2.2, 3.0.

As requested the psutil versions from above were checked. Worked fine for every release with an API change.

ucs-4.0-3
OK - debian changelog
OK - yaml file

ucs-4.1
OK - debian changelog
Comment 6 Janek Walkenhorst univentionstaff 2015-09-15 13:36:50 CEST
<http://errata.software-univention.de/ucs/4.0/318.html>