Univention Bugzilla – Bug 34625
Check file quota module
Last modified: 2023-03-25 06:44:56 CET
<https://hutten.knut.univention.de/mediawiki/index.php/Produkttests_UCS_3.2_UMC#Quota-Modul> 1. Check query command. 2. Try to setup a quota on one mount point (may require setting up some test partition using the look-back-device?).
(In reply to Philipp Hahn from comment #0) > 2. Try to setup a quota on one mount point (may require setting up some test > partition using the look-back-device?). Have a look at: ucs-test/tests/53_samba-common/50quota http://forge.univention.org/websvn/filedetails.php?repname=dev&path=%2Fbranches%2Fucs-3.2%2Fucs-3.2-1%2Ftest%2Fucs-test%2Ftests%2F53_samba-common%2F50quota
r50463: * /60_umc-system/50_umc-service-quotas-management: test quota management via UMC (Bug #34625) * /60_umc-system/TestUMCSystemModule.py: refactored query request methods
The test in the AWS envs is skipped because the partitioning is different from the default UCS installations: Creating a test user for testing user-specific quotas set up Creating users/user object with {'username': 'umc_test_user_aqfdsb', 'position': 'cn=users,dc=autotest090,dc=local', 'password': 'univention', 'firstname': 'ybcw9hig5p', 'lastname': 'bwfpjc960w'} Waiting for replication: OK: replication complete (nid=9445 lid=9445) Done: replication complete. Making 'quota/partitions' query request Checking quotas query response structure Choosing partition device for the test (with '/boot' mount point) Failed to select a partition for the test, skipping Cleaning up created quotas and test user (if any), restoring initial partition quota setting to 'inUse=None' Cleanup after exception: <type 'exceptions.SystemExit'> 77 Performing UCSTestUDM cleanup... UCSTestUDM cleanup done
r50817: * /60_umc-system/50_umc-service-quotas-management: now using '/' mount point to test quotas management with any partitioning scheme (Bug #34625) The test assumes that setting quotas for '/' now works, i.e. that Bug #31277 is resolved. (Verified on UCS member server with manually patched /usr/lib/pymodules/python2.6/univention/management/console/modules/quota/tools.py)
(In reply to Dmitry Galkin from comment #4) > The test assumes that setting quotas for '/' now works, i.e. that Bug #31277 > is resolved. Looks good: While QAing Bug #31277 the test passed successfully
The test currently fails in EC2, even thou Bug #31277 is fixed. After adding a debug statement in /usr/share/pyshared/univention/management/console/modules/quota/tools.py it shows the cause: # umc-command -U Administrator -P univention quota/users/set -o partitionDevice=/dev/vda1 -o user=y23j4odaqi -o sizeLimitSoft=10 -o sizeLimitHard=10 -o fileLimitHard=0 -o fileLimitSoft=0 ... # LANG=C /usr/sbin/setquota -u y23j4odaqi 10240 10240 0 0 /dev/vda1 setquota: Cannot stat() given mountpoint /dev/vda1: No such file or directory Skipping... setquota: No correct mountpoint specified. setquota: Cannot initialize mountpoint scan. In /etc/fstab "/dev/vda1" is used, but as EC2 is using Xen, it should be "/dev/*x*vda1": # ucr search --brief --value vda grub/boot: /dev/vda grub/root: /dev/xvda1 installer/device/0/name: /dev/vda2 installer/device/1/name: /dev/vda1 PS: The test does a reverse-lookup for / through UMC "quota/partitions/query", which already returns the wrong "/dev/vda1": # umc-command -U Administrator -P univention quota/partitions/query RESULT : [{...'mountPoint': '/', ... 'partitionDevice': '/dev/vda1'}, ...] as its wrong in both mount files: # grep vda /etc/fstab /etc/mtab /etc/fstab:/dev/vda1 / ext3 acl,errors=remount-ro,user_xattr,usrquota 0 1 /etc/fstab:/dev/xvda3 none swap sw 0 0 /etc/mtab:/dev/vda1 / ext3 rw,acl,errors=remount-ro,user_xattr,usrquota 0 0 Actually swap is also wrong and does not exist: # cat /proc/partitions major minor #blocks name 202 1 10485760 xvda1 After fixing /etc/fstab manually and rebooting, UMC returns the right information and the test works. This will be fixed through Bug #35269 in future EC2 images.
r51608: * 60_umc-system/50_umc-service-quotas-management: don't run the test on UCS versions older than 3.2-3 (Bug #34625)
OK: r50463,r50817,r51608 OK: 50_umc-service-quotas-management FYI: test currently fails with UCS-3.2-2 EC2 images due to the bug described in comment 6