Bug 1291064

Summary: Change vm memory and cpu number not update automatically VNUMA nodes memory and cpu number
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: Backend.CoreAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: medium    
Version: 3.6.1.3CC: akrejcir, alukiano, bugs, dfediuck
Target Milestone: ovirt-4.1.2Keywords: Triaged
Target Release: 4.1.2Flags: rule-engine: ovirt-4.1+
rule-engine: exception+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-23 08:12:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1421420    

Description Artyom 2015-12-13 11:56:59 UTC
Description of problem:
Change vm memory and cpu number not update automatically VNUMA nodes memory and cpu number.

Version-Release number of selected component (if applicable):
rhevm-3.6.1.3-0.1.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create vm with 2Gb of memory, 4 cpu's and 2 numa nodes
NUMA nodes via REST:
<vm_numa_nodes>
 <vm_numa_node href="/ovirt-engine/api/vms/c7ecd2dc-dbd3-4419-956f-1249651c0f2b/numanodes/98eca861-56b4-4b51-825e-af6427821d1f" id="98eca861-56b4-4b51-825e-af6427821d1f">
<index>0</index>
<memory>1024</memory>
<cpu>
<cores>
<core index="0" />
<core index="1" />
</cores>
</cpu>
<vm href="/ovirt-engine/api/vms/c7ecd2dc-dbd3-4419-956f-1249651c0f2b" id="c7ecd2dc-dbd3-4419-956f-1249651c0f2b" />
 </vm_numa_node>
 <vm_numa_node href="/ovirt-engine/api/vms/c7ecd2dc-dbd3-4419-956f-1249651c0f2b/numanodes/84c982f7-ffa8-4213-a962-a99159ff3e69" id="84c982f7-ffa8-4213-a962-a99159ff3e69">
<index>1</index>
<memory>1024</memory>
<cpu>
<cores>
<core index="2" />
<core index="3" />
</cores>
</cpu>
<vm href="/ovirt-engine/api/vms/c7ecd2dc-dbd3-4419-956f-1249651c0f2b" id="c7ecd2dc-dbd3-4419-956f-1249651c0f2b" />
 </vm_numa_node>
 </vm_numa_nodes>
2. Change amount of memory and number of cpu's on vm, for example to 1Gb and 2 CPU, vm numa nodes looks the same
3.

Actual results:
vm numa nodes memory and amount of cpu's stay the same as before update

Expected results:
I believe we need to change memory and cpu's number of vm numa node according to vm memory and number of cpu's or at least give warning message

Additional info:
it can create real misunderstanding, because guest os will just not have any numa nodes, because we send incorrect numa architecture for vm.

Comment 1 Artyom 2017-01-25 12:12:38 UTC
Checked on rhevm-4.1.0.2-0.2.el7.noarch

Have two NUMA nodes:
<vm_numa_nodes>
<vm_numa_node href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9/numanodes/e3417d9a-bc73-4a7e-aa85-ff1545613f00" id="e3417d9a-bc73-4a7e-aa85-ff1545613f00">
<cpu>
<cores>
<core>
<index>0</index>
</core>
</cores>
</cpu>
<index>0</index>
<memory>1024</memory>
<vm href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9" id="5df59ddd-a70a-405e-b528-f02bdcf0d3c9" />
 </vm_numa_node>
<vm_numa_node href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9/numanodes/e65bfe9a-d3db-4704-bd14-abba5f1d0b69" id="e65bfe9a-d3db-4704-bd14-abba5f1d0b69">
<cpu>
<cores>
<core>
<index>1</index>
</core>
</cores>
</cpu>
<index>1</index>
<memory>1024</memory>
<vm href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9" id="5df59ddd-a70a-405e-b528-f02bdcf0d3c9" />
 </vm_numa_node>
 </vm_numa_nodes>

Ater VM memory update, nodes still have the same amount of memory:
<vm>
  <memory>4294967296</memory>
</vm>

<vm_numa_nodes>
<vm_numa_node href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9/numanodes/e3417d9a-bc73-4a7e-aa85-ff1545613f00" id="e3417d9a-bc73-4a7e-aa85-ff1545613f00">
<cpu>
<cores>
<core>
<index>0</index>
</core>
</cores>
</cpu>
<index>0</index>
<memory>1024</memory>
<vm href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9" id="5df59ddd-a70a-405e-b528-f02bdcf0d3c9" />
 </vm_numa_node>
<vm_numa_node href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9/numanodes/e65bfe9a-d3db-4704-bd14-abba5f1d0b69" id="e65bfe9a-d3db-4704-bd14-abba5f1d0b69">
<cpu>
<cores>
<core>
<index>1</index>
</core>
</cores>
</cpu>
<index>1</index>
<memory>1024</memory>
<vm href="/ovirt-engine/api/vms/5df59ddd-a70a-405e-b528-f02bdcf0d3c9" id="5df59ddd-a70a-405e-b528-f02bdcf0d3c9" />
 </vm_numa_node>
 </vm_numa_nodes>

Comment 2 Red Hat Bugzilla Rules Engine 2017-01-25 12:12:44 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 3 Martin Sivák 2017-01-25 13:56:09 UTC
Artyom, what about the UI? Does it work correctly in webadmin?

Comment 4 Artyom 2017-01-25 15:22:51 UTC
Yes under webadmin all works fine.

Comment 5 Sandro Bonazzola 2017-02-01 16:01:26 UTC
oVirt 4.1.0 GA has been released, re-targeting to 4.1.1.
Please check if this issue is correctly targeted or already included in 4.1.0.

Comment 6 Andrej Krejcir 2017-02-02 10:57:34 UTC
The GUI fix was merged to 4.1.0 , but not the REST part.

Comment 7 Andrej Krejcir 2017-02-02 11:00:46 UTC
Should we leave the correct update of NUMA nodes to the user of the REST api?

I have added a patch to prevent NUMA nodes with invalid memory or CPUs,
but it does not automatically correct the memory or CPUs when VM is updated.

Comment 8 Doron Fediuck 2017-03-01 11:32:54 UTC
*** Bug 1421420 has been marked as a duplicate of this bug. ***

Comment 9 Artyom 2017-04-27 14:22:32 UTC
Verified on rhevm-4.1.2-0.1.el7.noarch