Univention Bugzilla – Bug 50835
Improve error handling for quota parsing
Last modified: 2020-08-06 09:24:06 CEST
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.
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. =====================================