Bug 48000 - Quota policies are overwritten with 0/0/0/0 if there's at least one share without quota policy reference
Quota policies are overwritten with 0/0/0/0 if there's at least one share wit...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Quota
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Jannik Ahlers
Jürn Brodersen
:
Depends on: 40001
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-16 11:27 CEST by Valentin Heidelberger
Modified: 2019-07-10 13:20 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018072621000223
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Valentin Heidelberger univentionstaff 2018-10-16 11:27:40 CEST
Cloning to track this separately.

Quota policies are currently always overwritten if there's at least one share without a reference to it. This is especially problematic in school environments where a share is created for every single class, quickly resulting in a LOT of shares.

The problem seems to be that univention-user-quota doesn't process a share without a reference to a quota policy as "no quota" but as "0/0/0/0". Since 0 is smaller than any configured quota, it always overwrites other quota policies, because it is always the most restrictive quota.

Workarounds:

- Apply a reference to the quota policy on a container above the shares in the LDAP tree (e.g. the school OU) (the LDAP directory module can be used for this)

- Apply a reference to the quota policy to every existing share

+++ This bug was initially created as a clone of Bug #40001 +++

The checkbox "Reapply settings on every login" does not overwrite user specific quota on login. In the UMC module the soft and hard limit for Data size shows 0/0 but the user specific quota is still valid.
Comment 1 Valentin Heidelberger univentionstaff 2018-11-05 15:57:34 CET
Will probably affect a lot of school environments, quotas are a very regular requirement there in my experience. -> key scenario
Comment 2 Jannik Ahlers univentionstaff 2019-07-08 11:45:45 CEST
There is a fix available in branch jahlers/48000-quota-0/0/0/0.
Comment 3 Jannik Ahlers univentionstaff 2019-07-08 11:45:45 CEST
There is a fix available in branch jahlers/48000-quota-0/0/0/0.
Comment 4 Jannik Ahlers univentionstaff 2019-07-08 17:15:24 CEST
To fix this bug, I refactored a whole lot of the univention-user-quota script. It should work as intended now, 0 will not be interpreted as the smallest value anymore.
I also wrote some tests for multiple quota policies that are defined on shares that are on the same mountpoint.


76173d2a97 Bug #48000: yaml
64d56a6ffe Bug #48000: Merge branch 'jahlers/48000-quota-0/0/0/0' into 4.4-0
a51a0300c5 Bug #48000: yaml
96dc639414 Bug #48000: make changes after code review
70b881130c Bug #48000: make quota behave better when two shares with quota policies are on the same mountpoint
ed4e381c8e Bug #48000: added new tests for quota
dd79fbcfa3 Bug #48000: fix typo
9405a2614c Bug #48000: refactoring of quota script

Successful build
Package: univention-quota
Version: 13.0.1-5A~4.4.0.201907081649
Branch: ucs_4.4-0
Scope: errata4.4-0

Successful build
Package: ucs-test
Version: 9.0.2-117A~4.4.0.201907081705
Branch: ucs_4.4-0
Scope: errata4.4-0
Comment 5 Jürn Brodersen univentionstaff 2019-07-08 18:50:04 CEST
What I tested:
Merge -> OK
Policy without "reapply each login" -> quota is set for user without quota -> OK
Policy without "reapply each login" -> quota is not set for user with quota -> OK
Policy with "reapply each login" -> quota is set for user without quota -> OK
Policy with "reapply each login" -> quota is set for user with quota -> OK

Policy mixing -> smallest values are chosen for each attribute, EXCLUDING zero values -> OK
Tests -> OK

Small yaml change to make it more clear what the fixed bahaviour is:
[4.4-0 a782f63dab] Bug #48000: yaml

-> Verified
Comment 6 Erik Damrose univentionstaff 2019-07-10 13:20:30 CEST
<http://errata.software-univention.de/ucs/4.4/180.html>