Bug 45927 - psutil API change (60_umc/22_top_process_killing)
psutil API change (60_umc/22_top_process_killing)
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Process overview
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Florian Best
Johannes Keiser
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-21 11:16 CET by Florian Best
Modified: 2018-07-16 17:10 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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: 2018071421000148
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 Florian Best univentionstaff 2017-12-21 11:16:47 CET
Die Ausführung des Kommandos top/query ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 250, in execute
    function.__func__(self, request, *args, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 192, in _response
    return function(self, request)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/top/__init__.py", line 62, in query
    (user_time, system_time, ) = process.get_cpu_times()
AttributeError: 'Process' object has no attribute 'get_cpu_times'
Comment 1 Florian Best univentionstaff 2017-12-21 11:42:53 CET
Adjusted to the following API Change:
get_memory_percentage() → memory_percentage()
user, system = get_cpu_times() → cpu_times().{user,system}

changelog-4.3-0.xml
f0836db4f8dc | Changelog Bug #45927

univention-management-console-module-top (7.0.1-1)
ff772442fefc | Bug #45927: adapt to API change of psutil
Comment 2 Johannes Keiser univentionstaff 2018-01-31 12:57:32 CET
OK code
OK test
-> verified
Comment 3 Stefan Gohmann univentionstaff 2018-03-14 14:38:39 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

If this error occurs again, please use "Clone This Bug".
Comment 4 Johannes Keiser univentionstaff 2018-07-16 17:10:57 CEST
External feedback:
Version: 4.2-3 errata312 (Lesum)

Remark: Nach Serverneustart und anschließender Anmeldung

Interner Server-Fehler in "top/query".
Request: top/query

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 253, in execute
    function.__func__(self, request, *args, **kwargs)
  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 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/top/__init__.py", line 62, in query
    (user_time, system_time, ) = process.get_cpu_times()
AttributeError: 'Process' object has no attribute 'get_cpu_times'

Role: domaincontroller_master