Bug 39302

Summary: TypeError in top/query
Product: UCS Reporter: Florian Best <best>
Component: UMC - Process overviewAssignee: Florian Best <best>
Status: CLOSED FIXED QA Contact: Alexander Kramer <kramer>
Severity: normal    
Priority: P5 CC: gohmann, mai, walkenhorst
Version: UCS 4.0Flags: best: Patch_Available+
Target Milestone: UCS 4.0-3-errata   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=39323
https://forge.univention.org/bugzilla/show_bug.cgi?id=39322
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:
Attachments: patch

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>