Univention Bugzilla – Bug 36207
Test case 50_umc-service-quotas-management fails in UCS 4.0
Last modified: 2014-11-26 06:54:03 CET
The test case 50_umc-service-quotas-management fails in UCS 4.0: ------------------------------------------------------------------------------- Creating a test user for testing user-specific quotas setup through UMC Creating users/user object with {'username': 'umc_test_user_yveesn', 'position': 'cn=users,dc=autotest095,dc=local', 'password': 'univention', 'firstname': 'uafcxhh7hs', 'lastname': 'd61swnpbnp'} Waiting for replication: OK: replication complete (nid=7165 lid=7165) Done: replication complete. Making 'quota/partitions' query request and checking response structure Choosing partition device for the test (with '/' mount point) Deactivating quotas for partition device '/dev/xvda1' Activating quotas for '/dev/xvda1' partition device Setting 'umc_test_user_yveesn' user quota for '/dev/xvda1' partition Removing 'umc_test_user_yveesn' user quota for '/dev/xvda1' partition Deactivating quotas for '/dev/xvda1' partition device ### FAIL ### The quota on a device '/dev/xvda1' was reported as 'inUse' after being deactivated ### ### Cleaning up created quotas and the test user (if any), restoring initial partition quota setting to 'inUse=False' Cleanup after exception: <type 'exceptions.SystemExit'> 1 Performing UCSTestUDM cleanup... UCSTestUDM cleanup done ------------------------------------------------------------------------------- http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-0/job/Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=slave/32/testReport/junit/60_umc-system/50_umc-service-quotas-management/test/ It could be a problem in the test case or in the quota implementation.
Actually the problem was in the UMC quota module, it 1. detected quota activation state via "usrquota" option presence in /etc/mtab 2. failed to disable the "usrquota" option in /etc/mtab during deactivation. There were more issues. I adjusted the activation/deactivation and detection: * Detect quota activation via "quotaon" instead of "usrquota" * When turning quota off skip remount, just leave usrquota fs option on * Avoid turning quota on/off for all, only do it for the target partition * Run checkquota only before activation (i.e. with quota off) * Only run slow checkquota if the aquota.user file doesn't exist yet The handling of the four layers: fstab, mtab, aquota.user and quotaon/off should now be clearer, more robust and have less side effects.
For manual testing these commands might be useful: umc-command quota/partitions/activate \ -o partitionDevice=/dev/mapper/vg_ucs-root \ -U Administrator -P univention umc-command quota/partitions/query \ -U Administrator -P univention umc-command quota/partitions/deactivate \ -o partitionDevice=/dev/mapper/vg_ucs-root \ -U Administrator -P univention
test case runs without error quota is activated and deactivated correctly and also detected changelog ok
UCS 4.0-0 has been released: http://docs.univention.de/release-notes-4.0-0-en.html http://docs.univention.de/release-notes-4.0-0-de.html If this error occurs again, please use "Clone This Bug".