Bug 1301353 - memory overcommit accepts negative values and sets them to 200%
memory overcommit accepts negative values and sets them to 200%
Status: CLOSED WONTFIX
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core (Show other bugs)
3.6.2
Unspecified Unspecified
low Severity medium (vote)
: ovirt-4.1.0-alpha
: ---
Assigned To: Yanir Quinn
meital avital
: Automation, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-24 07:18 EST by Nelly Credi
Modified: 2016-07-17 03:29 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-17 03:29:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dfediuck: ovirt‑4.1?
rule-engine: planning_ack+
dfediuck: devel_ack+
rule-engine: testing_ack?


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 59232 master MERGED restapi:fix overcommit accepts negative values 2016-07-14 07:01 EDT

  None (edit)
Description Nelly Credi 2016-01-24 07:18:42 EST
Description of problem:
Memory overcommit should only accept allowed values- 100/150/200% in API, but instead it accepts all values
this is a negative flow

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. create cluster
2. update memory overcommit to value != 100/150/200

Actual results:
Update successfully to wrong value
<memory_policy>
        <overcommit percent="76"/>
    </memory_policy>

Expected results:
should fail


Additional info:
This is true for all APIs - cli, java, python & rest
Im putting this on medium because Im not sure what is the affect of having not allowed values set

the failing test:
https://rhev-jenkins.rhev-ci-vms.eng.rdu2.redhat.com:8443/view/3.6_Dev/job/3.6-GE-infra/174/testReport/rhevmtests.system.regression.component.test_clusters/007-TestCaseCluster_REST;test_update_cluster_memory_overcommit/TestCaseCluster_REST_test_update_cluster_memory_overcommit/
Comment 1 Juan Hernández 2016-01-25 06:27:18 EST
The API doesn't perform any validation on this value. If values other than 100/150/200 should be rejected then the backend should validate that and return the appropriate error message to the API.
Comment 2 Doron Fediuck 2016-01-26 05:01:05 EST
This is the expected behavior and works by design.
We allow other positive values using the REST API.
If you can set a negative value, please reopen this BZ.
Comment 3 Nelly Credi 2016-01-26 07:36:58 EST
Reopened

Indeed we are able to set positive values and in the UI the result is:
Custom Overcommit Threshold - Set to 3% via API/CLI

but when I set any negative value via the API it is set to 200%
Comment 4 Doron Fediuck 2016-01-26 08:38:01 EST
(In reply to Nelly Credi from comment #3)
> Reopened
> 
> Indeed we are able to set positive values and in the UI the result is:
> Custom Overcommit Threshold - Set to 3% via API/CLI
> 
> but when I set any negative value via the API it is set to 200%

Thanks. So this is mainly a harmless nit to ensure we either fail or
set the default value (120%).
Comment 5 Red Hat Bugzilla Rules Engine 2016-01-26 08:38:02 EST
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 6 Sven Kieske 2016-01-28 07:54:10 EST
I just want to make sure you don't disable this feature:

in fact we use this to allow for greater overcommits than 200% (which seems just a randomly chosen artificial limit anyway?)

thanks

Sven
Comment 7 Sandro Bonazzola 2016-05-02 05:53:58 EDT
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.
Comment 8 Sven Kieske 2016-05-09 09:52:38 EDT
(In reply to Sven Kieske from comment #6)
> I just want to make sure you don't disable this feature:
> 
> in fact we use this to allow for greater overcommits than 200% (which seems
> just a randomly chosen artificial limit anyway?)
> 
> thanks
> 
> Sven

Can someone maybe explain why this feature should be removed?

Thanks

Sven
Comment 9 Yaniv Lavi 2016-05-23 09:16:09 EDT
oVirt 4.0 beta has been released, moving to RC milestone.
Comment 10 Yaniv Lavi 2016-05-23 09:21:59 EDT
oVirt 4.0 beta has been released, moving to RC milestone.
Comment 11 Doron Fediuck 2016-06-15 05:03:35 EDT
Since this is mostly harmless I'm closing for capacity reasons.
If someone has a compelling reason to solve it, please reopen with the full explanation. Patches are always welcomed.
Comment 12 Doron Fediuck 2016-06-15 07:54:12 EDT
Reopening since there's a patch available.
This will be handled for 4.1.
Comment 13 Red Hat Bugzilla Rules Engine 2016-06-15 07:54:19 EDT
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 14 Doron Fediuck 2016-07-17 03:29:11 EDT
The suggested patch caused a regression.
Closing this as we have more important issues to fix.

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