Bug 50835 - Improve error handling for quota parsing
Summary: Improve error handling for quota parsing
Status: RESOLVED WONTFIX
Alias: None
Product: UCS
Classification: Unclassified
Component: UMC - Quota
Version: UCS 4.4
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UMC maintainers
QA Contact: UMC maintainers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-18 13:22 CET by Jürn Brodersen
Modified: 2025-02-05 09:28 CET (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?: Yes
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2020073021000621
Bug group (optional):
Customer ID: 15219
Max CVSS v3 score:


Attachments
Debug quotza tracebacks (672 bytes, text/x-python)
2020-02-18 13:22 CET, Jürn Brodersen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2020-02-18 13:22:06 CET
Created attachment 10297 [details]
Debug quotza tracebacks

Improve error handling for quota parsing

If any line of the repquota output can't be parsed a traceback is thrown. This should be improved with a human readable error or warning message.

repquota can now output the quotas as csv, which should make the parsing less error prone as well.


A small script for debugging has been attached.
Comment 2 Christian Völker univentionstaff 2020-08-06 09:24:06 CEST
In an paedML environment a similar traceback in diagnosis module appeared even when absolutely no quotas where enabled on the filesystems:
========================
root@server:/var/lib/univention-client-boot# mount | grep mapp
/dev/mapper/vg_ucs-rootfs on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mapper/vg_ucs-homefs on /home type ext4 (rw,relatime,data=ordered)
/dev/mapper/vg_ucs-varfs on /var type ext4 (rw,relatime,data=ordered)
/dev/mapper/vg_ucs-varfs on /var/lib/docker/overlay type ext4 (rw,relatime,data=ordered)
========================

Traceback:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/__init__.py", line 275, in execute
    result = execute(umc_module, **kwargs)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/30_disk_usage.py", line 136, in run
    if problem_on_varlog and high_log_levels():
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/30_disk_usage.py", line 108, in high_log_levels
    return any(check(configRegistry) for check in checks)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/30_disk_usage.py", line 108, in 
    return any(check(configRegistry) for check in checks)
  File "/usr/lib/pymodules/python2.7/univention/management/console/modules/diagnostic/plugins/30_disk_usage.py", line 73, in 
    return lambda ucr: int(ucr.get(variable, default)) > default
ValueError: invalid literal for int() with base 10: 'none'

=====================================
root@server:/var/lib/univention-client-boot# cat /etc/lsb-release
# Warning: This file is auto-generated and might be overwritten by
#          univention-config-registry.
#          Please edit the following file(s) instead:
# Warnung: Diese Datei wurde automatisch generiert und kann durch
#          univention-config-registry ueberschrieben werden.
#          Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
#
#       /etc/univention/templates/files/etc/lsb-release
#

DISTRIB_ID=Univention
DISTRIB_RELEASE="4.3-5 errata682"
DISTRIB_CODENAME=Neustadt

DISTRIB_DESCRIPTION="Univention Corporate Server 4.3-5 errata682 (Neustadt)"
=====================================
root@server:/var/lib/univention-client-boot# repquota /home
repquota: Einhängepunkt oder Gerät /home nicht gefunden oder hat keine aktivierten Quotas.
repquota: Nicht alle angegebenen Mountpunkte verwenden Quotas.

=====================================
Comment 3 Jan-Luca Kiok univentionstaff 2025-02-05 09:28:41 CET
This issue has been filed against UCS 4.4.

UCS 4.4 is out of maintenance and components may have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer versions, please use "Clone this bug" or reopen this issue. In this case please provide information on how this issue is affecting you.