Description of problem: DataCenter set quota to Audit, Add quota set the threshold to 0%, the AddQuotaCommand will modify to default value 80%, but Edit quota can set the threshold to 0%. Version-Release number of selected component (if applicable): 4.1.1 How reproducible: Steps to Reproduce: 1.Select one DataCenter, set Quota to Audit; 2.Add Quota, set the threshold of cluster/storage to 0%; 3.Click save. Actual results: This Quota's threshold is 0%. Expected results: This Quota's threshold is 80%. Additional info: When set the threshold to 0%, the AddQuotaCommand will modify to the default value 80%, but Edit the Quota's threshold can set to 0%.
Did you set any limitation other tan changing the threshold? If the quota is unlimited (no limitation set) then threshold and grace are meaningless. Once you set an actual limitation the value is saved.
(In reply to Doron Fediuck from comment #1) > Did you set any limitation other tan changing the threshold? > If the quota is unlimited (no limitation set) then threshold and grace are > meaningless. Once you set an actual limitation the value is saved. The results is: Add Quota cannot set threshold to 0%, Edit Quota can do it.
The solution: https://gerrit.ovirt.org/#/c/72411/
Setting Alex, who reviewed the patch (BTW, thanks Tony!) as the assignee, just so this BZ will stop popping up in the morning whine.
Hi, the bug is fixed in UI , but still happens in Rest - update the threshold to 0 is allowed by sending Rest API which is inconsistent behavior. As result we have two different pictures. Content-Type: application/xml PUT https://compute-ge-3.scl.lab.tlv.redhat.com/ovirt-engine/api/datacenters/ca758db3-1caa-42f6-b590-10da99633efd/quotas/ec8b6e3f-e4da-4293-93c9-9595f76b5a8e <quota> <cluster_soft_limit_pct>0</cluster_soft_limit_pct> </quota> response code 200 and response body with updated 0. product version where tested - ovirt-engine-4.2.0-0.0.master.20171023193344
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
@Juan Do you know who can fix this in the REST api?
The API doesn't perform business logic validation. If we don't want to allow setting the `cluster_soft_limit_pct` to 0, then we should check that in the backend, in the `UpdateQuotaCommand` class.
@Oved Should we assign this to the infra team then? As the remaining issue is a backend issue?
(In reply to Alexander Wels from comment #9) > @Oved > > Should we assign this to the infra team then? As the remaining issue is a > backend issue? This command is SLA, which is assigned for. Doron?
Assigned to Yanir.
now rest request with 0 values is responded with 200, but the values are reset to defaults in this case