Bug 1940529 - [RFE] Set guaranteed memory of VM according to its defined memory when not specified
Summary: [RFE] Set guaranteed memory of VM according to its defined memory when not sp...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.4.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.4.7
: 4.4.7
Assignee: Arik
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-18 15:24 UTC by Guilherme Santos
Modified: 2021-07-06 07:28 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.4.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-06 07:28:33 UTC
oVirt Team: Virt
Embargoed:
ahadas: ovirt-4.4?
pm-rhel: planning_ack?
pm-rhel: devel_ack+
gdeolive: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 114747 0 master MERGED rest-api: set min-memory = memory when not specified 2021-05-20 16:40:41 UTC

Description Guilherme Santos 2021-03-18 15:24:51 UTC
Description of problem:
when deploying a vm using api/sdk, setting the memory value doesn't automatically change the value of guarantee_memory like it does when selecting it through web-ui.
I don't see this as a problem itself, however the default value of guarantee_memory is 1Gb which, IMHO, it's too little for most the use cases (RHEL6 asks for at least 2Gb of memory required). 
Some situations, such as machines for kubernetes/openshift which are resource hungry and have the deployment of the vms automated, can be very affected by this silent memory overcommit 


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

How reproducible:
always

Steps to Reproduce:
1. deploy vm using api/sdk setting memory but not setting guarantee_memory
2. check the guarantee_memory in the web-ui
3.

Actual results:
1Gb of guarantee_memory

Expected results:
at least 2Gb or automatically depending of the memory value (like in the web-ui)

Additional info:

Comment 2 Michal Skrivanek 2021-03-19 10:54:57 UTC
defaults are coming form Blank template

would you want to turn this into an RFE?

Comment 3 Arik 2021-03-22 12:22:31 UTC
We can alternatively make rest-api imitate what the UI does when the guaranteed memory is not specified through the API

Comment 4 Michal Skrivanek 2021-03-25 14:30:12 UTC
(In reply to Arik from comment #3)
> We can alternatively make rest-api imitate what the UI does when the
> guaranteed memory is not specified through the API

you mean backend, right, as we're not putting any logic into the rest api layer.

Comment 5 Arik 2021-03-25 15:48:41 UTC
(In reply to Michal Skrivanek from comment #4)
> (In reply to Arik from comment #3)
> > We can alternatively make rest-api imitate what the UI does when the
> > guaranteed memory is not specified through the API
> 
> you mean backend, right, as we're not putting any logic into the rest api
> layer.

Yes, I meant the rest-api modules on the backend side - where we set defaults for missing parts in requests that come from the API

Comment 6 Guilherme Santos 2021-06-29 17:30:27 UTC
Verified on:
ovirt-engine-4.4.7.5-0.9.el8ev.noarch

Steps:
1. Create a vm usign the API (tru rest, sdk or ansible for example):
# ansible localhost -c localhost -m ovirt.ovirt.ovirt_vm -a "name=vm_1 cluster=cluster_1 state=present auth='url=https://`hostname`/ovirt-engine/api username=admin@internal password=<pass> insecure=true' memory=4GiB"
2. Check the vm parameters in the UI

Results:
Guarantee memory automatically set accorded e

Comment 7 Guilherme Santos 2021-06-29 17:30:56 UTC
typo:
*... accorded to memory set

Comment 8 Sandro Bonazzola 2021-07-06 07:28:33 UTC
This bugzilla is included in oVirt 4.4.7 release, published on July 6th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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