Bug 1422922 - DataCenter Quota's threshold value
Summary: DataCenter Quota's threshold value
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: future
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Yanir Quinn
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-16 14:56 UTC by Tony Wang
Modified: 2018-01-12 12:57 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-01-12 12:57:43 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 72411 0 None None None 2017-02-22 05:28:31 UTC
oVirt gerrit 83607 0 master MERGED core: Set default values for quota updates 2017-11-22 11:55:05 UTC

Description Tony Wang 2017-02-16 14:56:11 UTC
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%.

Comment 1 Doron Fediuck 2017-02-19 13:30:11 UTC
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.

Comment 2 Tony Wang 2017-02-22 00:00:27 UTC
(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.

Comment 3 Tony Wang 2017-02-22 01:54:40 UTC
The solution: https://gerrit.ovirt.org/#/c/72411/

Comment 4 Allon Mureinik 2017-05-23 05:35:45 UTC
Setting Alex, who reviewed the patch (BTW, thanks Tony!) as the assignee, just so this BZ will stop popping up in the morning whine.

Comment 5 Polina 2017-10-29 11:44:12 UTC
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

Comment 6 Red Hat Bugzilla Rules Engine 2017-10-29 11:44:17 UTC
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.

Comment 7 Alexander Wels 2017-10-30 12:40:05 UTC
@Juan

Do you know who can fix this in the REST api?

Comment 8 Juan Hernández 2017-10-31 08:49:30 UTC
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.

Comment 9 Alexander Wels 2017-10-31 14:47:02 UTC
@Oved

Should we assign this to the infra team then? As the remaining issue is a backend issue?

Comment 10 Oved Ourfali 2017-10-31 14:52:33 UTC
(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?

Comment 11 Doron Fediuck 2017-10-31 15:33:47 UTC
Assigned to Yanir.

Comment 12 Polina 2018-01-02 10:11:34 UTC
now rest request with 0 values is responded with 200, but the values are reset to defaults in this case


Note You need to log in before you can comment on or make changes to this bug.