Bug 1024298
Summary: | [ovirt-engine-backend] wrong error message (event) when creating VM with wrong memory size. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Kiril Nesenko <knesenko> | ||||
Component: | ovirt-engine | Assignee: | Roy Golan <rgolan> | ||||
Status: | CLOSED NOTABUG | QA Contact: | Ilanit Stein <istein> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 3.3.0 | CC: | acathrow, bazulay, dfediuck, edolinin, eedri, emesika, hateya, iheim, istein, knesenko, lpeer, michal.skrivanek, pnovotny, Rhev-m-bugs, yeylon | ||||
Target Milestone: | --- | Keywords: | AutomationBlocker, AutomationTriaged, Regression, Reopened, TestBlocker, Triaged | ||||
Target Release: | 3.3.1 | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | virt | ||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-11-17 07:54:14 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Kiril Nesenko
2013-10-29 11:06:37 UTC
Created attachment 817052 [details]
logs
unable to reproduce. Has used the following VM with SERT API POST on the vms collections (api/vms) <vm> <name>vm2</name> <type>server</type> <status> <state>down</state> </status> <memory>68157440000</memory> <cpu> <topology sockets="1" cores="1"/> </cpu> <cpu_shares>0</cpu_shares> <os type="other"> <boot dev="hd"/> </os> <high_availability> <enabled>false</enabled> <priority>1</priority> </high_availability> <display> <type>spice</type> <monitors>1</monitors> <single_qxl_pci>false</single_qxl_pci> <allow_override>true</allow_override> <smartcard_enabled>false</smartcard_enabled> </display> <cluster href= "/api/clusters/369cf110-b792-42ba-ba3f-393f2b51d87b" id="369cf110-b792-42ba-ba3f-393f2b51d87b"/> <template href= "/api/templates/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/> <origin>ovirt</origin> <stateless>false</stateless> <delete_protected>false</delete_protected> <placement_policy> <affinity>migratable</affinity> </placement_policy> <memory_policy> <guaranteed>1073741824</guaranteed> <ballooning>true</ballooning> </memory_policy> <usb> <enabled>false</enabled> </usb> </vm> Result: VM was created event tough when you try to do it from UI you will get an error that memory can not exceeda 64000 MB In this case I had defined a VM with 65000MB (68157440000 Bytes) and got no error. (A BZ for that shoulg be opened separately IMHO) Please add a simple REST API code that reproduces the reported problem. Hello Eli, I provided a link to the test case in Comment #1 with all info. Note: You should create a VM with the following parameters: 2013-10-29 12:04:41,913 - MainThread - plmanagement.matrix-test-composer - INFO - Running command: addVm(False, name='novm', memory=214748, cluster='RestCluster1') - Kiril Still unable to reproduce the bug please provide the AddVm REST API call that caused the problem The 'novm' VM in the test appears twice in the test , once with positive memory size and once with a zero memory size , both was created successfully ... Setting info on Elena as Kiril recomended ... Adding Elena's email, explaining the problem: "If you are looking for REST request, see it below (can be found also at Jenkins log if you search for 'CREATE'). Afaiu, the test tries to create vm with wrong memory size and instead of error it gets success (with 0 memory in response). Hope it's helpful." 2013-10-29 12:04:42,364 - MainThread - vms - DEBUG - CREATE request content is -- url:https://jenkins-automation-rpm-vm47.eng.lab.tlv.redhat.com/api/vms body:<vm> <name>novm</name> <memory>214748</memory> <cluster href="/api/clusters/b954f172-f87c-4b4f-9b00-a277c9e43d7d" id="b954f172-f87c-4b4f-9b00-a277c9e43d7d"> <name>RestCluster1</name> <link href="/api/clusters/b954f172-f87c-4b4f-9b00-a277c9e43d7d/networks" rel="networks"/> <link href="/api/clusters/b954f172-f87c-4b4f-9b00-a277c9e43d7d/permissions" rel="permissions"/> <link href="/api/clusters/b954f172-f87c-4b4f-9b00-a277c9e43d7d/glustervolumes" rel="glustervolumes"/> <link href="/api/clusters/b954f172-f87c-4b4f-9b00-a277c9e43d7d/glusterhooks" rel="glusterhooks"/> <cpu id="Intel Conroe Family"/> <data_center href="/api/datacenters/177073fb-92ea-43d1-a8eb-5a63e58f3ecf" id="177073fb-92ea-43d1-a8eb-5a63e58f3ecf"/> <memory_policy> <overcommit percent="200"/> <transparent_hugepages> <enabled>true</enabled> </transparent_hugepages> </memory_policy> <scheduling_policy> <policy>none</policy> </scheduling_policy> <version major="3" minor="3"/> <error_handling> <on_error>migrate</on_error> </error_handling> <virt_service>true</virt_service> <gluster_service>false</gluster_service> <threads_as_cores>false</threads_as_cores> <tunnel_migration>false</tunnel_migration> <trusted_service>false</trusted_service> <ballooning_enabled>false</ballooning_enabled> </cluster> <template id="00000000-0000-0000-0000-000000000000"/> </vm> 2013-10-29 12:04:43,205 - MainThread - vms - ERROR - Response code is not valid, expected is: [400, 409, 500, 404], actual is: 201 Michal, The bug is that a VM creation with wrong memory succeed, though it should fail. It fails our regression VMs test. Can you please move this bug to target release 3.3? Otherwise it will continue to fail, till 3.4. Change causing that was done by Roy G in http://gerrit.ovirt.org/#/c/20178/ while resolving https://bugzilla.redhat.com/show_bug.cgi?id=1014952 This actually moved the memory check from the canDoAction to the execute method and generates only a warning for invalid memory Assigning to Roy all values are permitted now. I have disagreed with that before. anyhow the VM was create with 28k which is effectively 0Mb in the DB. the test should be refactored according the change in bug 1014952 - you *can* create a VM with any positive value of mem and you'll get an event back instead of a cando if the value is below the min memory for that OS |