Bug 1475382 - Max memory not adjusted when increasing memory using REST
Max memory not adjusted when increasing memory using REST
Status: CLOSED NOTABUG
Product: ovirt-engine
Classification: oVirt
Component: General (Show other bugs)
future
x86_64 Linux
unspecified Severity medium (vote)
: ---
: ---
Assigned To: bugs@ovirt.org
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-26 10:30 EDT by ladislav
Modified: 2017-07-26 16:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-26 16:52:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description ladislav 2017-07-26 10:30:44 EDT
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 10:43 EDT
Created attachment 1304826 [details]
template
Comment 2 jniederm 2017-07-26 12:36:20 EDT
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 12:51 EDT
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 13:22:49 EDT
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 16:52:16 EDT
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.