Bug 1475382 - Max memory not adjusted when increasing memory using REST
Summary: Max memory not adjusted when increasing memory using REST
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: future
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: bugs@ovirt.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-26 14:30 UTC by ladislav
Modified: 2017-07-26 20:52 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-26 20:52:16 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)
new VM from template (53.41 KB, image/png)
2017-07-26 14:30 UTC, ladislav
no flags Details
template (41.76 KB, image/png)
2017-07-26 14:43 UTC, ladislav
no flags Details
engine.log short (8.20 KB, text/plain)
2017-07-26 16:51 UTC, ladislav
no flags Details

Description ladislav 2017-07-26 14:30:44 UTC
Created attachment 1304824 [details]
new VM from template

Description of problem:


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


How reproducible:


Steps to Reproduce:
1. upgrade from 4.0.6 to 4.1.2
2. after upgrading all hosts and changing the compatibility version of cluster and DC to 4.1
3. create new VM with Memmory Size = 1024 MB, all other settings leave default
4. extend Memmory Size to > 4x1024 MB (example to: 8192 MB)


Actual results: 
1. Maximum Memmory Size = 4096 MB
2. Extend will fail
3. Default value in webadmin UI is 4x size of memory, although can be edited


Expected results:
Maximum Memmory Size - to be configurable in engine-setup or in DB, or in GUI will be taken from template from value Maximum memory

Additional info:

Comment 1 ladislav 2017-07-26 14:43:37 UTC
Created attachment 1304826 [details]
template

Comment 2 jniederm 2017-07-26 16:36:20 UTC
Hello Ladislav, could you please attach engine log (/var/log/ovirt-engine/engine.log) covering the failed memory extension?

Comment 3 ladislav 2017-07-26 16:51:17 UTC
Created attachment 1304919 [details]
engine.log short

newly created test VM name=vm-bug-1475382, created from template name=Blank


	

engine=# select vm_guid,vm_name,mem_size_mb,max_memory_size_mb from vm_static where vm_name LIKE 'Blank';
               vm_guid                | vm_name | mem_size_mb | max_memory_size_mb 
--------------------------------------+---------+-------------+--------------------
 00000000-0000-0000-0000-000000000000 | Blank   |        8192 |              32768
(1 row)

engine=# select vm_guid,vm_name,mem_size_mb,max_memory_size_mb from vm_static where vm_name LIKE 'vm-bug-1475382';
               vm_guid                |    vm_name     | mem_size_mb | max_memory_size_mb 
--------------------------------------+----------------+-------------+--------------------
 92af6761-a2c9-4901-9621-d80a3fbb4c92 | vm-bug-1475382 |        1024 |               4096
(1 row)

Comment 4 jniederm 2017-07-26 17:22:49 UTC
Steps to reproduce can be simplified to:
1. Create a VM
2. Update its memory using rest request

       PUT api/vms/{vmId}

       <vm>
         <memory>{number > current max memory}</memory>
       </memory>

Basically specifying of max memory when updating memory to value > current max memory using REST is currently required. This requirement is not compatible with API of engine 4.0.

Similar to bug 1430795 .

Comment 5 Michal Skrivanek 2017-07-26 20:52:16 UTC
You need to supply the max value too in case you want to increase the current size beyond the existing max
The same applies to min memory guaranteed and basically everything else. In REST you need to supply all the values you want to change


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