Bug 36923 - sysinfo/system: KeyError: 'mem'
sysinfo/system: KeyError: 'mem'
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Sysinfo
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-0-errata
Assigned To: Florian Best
Drees Dormann
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-20 14:42 CET by Florian Best
Modified: 2015-01-09 11:37 CET (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): Error handling, External feedback
Max CVSS v3 score:
best: Patch_Available+


Attachments
patch (1.14 KB, patch)
2014-11-20 14:42 CET, 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 2014-11-20 14:42:24 CET
Created attachment 6453 [details]
patch

Traceback:
Die Ausführung des Kommandos sysinfo/system ist fehlgeschlagen:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py",
line 218, in execute
    func( request )
  File
"/usr/lib/pymodules/python2.6/univention/management/console/modules/sysinfo/__init__.py",
line 119, in get_system_info
    if result['mem']:
KeyError: 'mem'

Attached a patch for correct error handling. Why was 'mem' no in univention-system-info output? Maybe it was but contained a ':' which leads to a ValueError which was swallowed.
Comment 1 Florian Best univentionstaff 2014-12-18 13:46:45 CET
The output parsing of univention-system-info could fail if multiple colons (':')
were contained in the output. Therefore the keys 'mem' and 'Temp' may
not be in the result dict. A followup error which was not in the patch has also been fixed → wrong reference was used, request → result.

Fix: svn r56966
YAML: YAML: 2014-12-18-univention-system-info.yaml
Comment 2 Drees Dormann univentionstaff 2014-12-18 15:14:20 CET
fixed

YAML OK
Comment 3 Janek Walkenhorst univentionstaff 2014-12-19 11:48:08 CET
http://errata.univention.de/ucs/4.0/11.html
Comment 4 Florian Best univentionstaff 2015-01-09 11:37:21 CET
Reported again, 4.0-0 errata0 (Walle)
Remark:
njkvcnzJDVNSZ:NVDn