Bug 1202129 - VM Pool is created with 0 VMs if error occured when creating VM
Summary: VM Pool is created with 0 VMs if error occured when creating VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.6
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 3.6.0
Assignee: Shmuel Melamud
QA Contact: sefi litmanovich
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-15 18:40 UTC by Shmuel Melamud
Modified: 2016-02-10 19:51 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-3.6.0-0.0.master.20150412172306.git55ba764
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 11:44:10 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 39336 0 master MERGED core: Remove VM pool if no VMs can be created Never

Description Shmuel Melamud 2015-03-15 18:40:36 UTC
Description of problem:

If VM Pool is created via REST API and one of VM parameters is incorrect, the VM Pool is created without any VMs. In the same time, the operation fails and user gets an error message describing error that occurred while creating the VM. 

How reproducible:
100%

Steps to Reproduce:
1. Create a VM Template.
2. Create VM Pool with incorrect VM parameters. For example, make POST request to api/vmpools/ with the following body:

<vmpool>
 <name>PoolTest</name>
 <description/>
 <size>1</size>
 <cluster id="---cluster_id---"/>
 <template id="---template_id---"/>
 <vm>
  <type>server</type>
  <memory>512000000</memory>
  <memory_policy>
   <guaranteed>700000000</guaranteed>
  </memory_policy>
 </vm>
 <prestarted_vms>0</prestarted_vms>
 <max_user_vms>1</max_user_vms>
</vmpool>

Actual results:
1. Operation returns error:
<fault>
 <reason>Operation Failed</reason>
 <detail>
  [Cannot create VM-Pool. Physical Memory Guaranteed cannot exceed Memory Size.]
 </detail>
</fault>
2. VM Pool 'PoolTest' is created without any VMs.

Expected results:
1. Operation returns error:
<fault>
 <reason>Operation Failed</reason>
 <detail>
  [Cannot create VM-Pool. Physical Memory Guaranteed cannot exceed Memory Size.]
 </detail>
</fault>
2. VM Pool is not created.

Additional info:

The bug became especially visible after adding majority of VM properties to VmPools collection as result of fixing Bug 1195167.

Comment 1 sefi litmanovich 2015-07-13 15:29:49 UTC
Verified with ovirt-engine-3.6.0-0.0.master.20150627185750.git6f063c1.el6.noarch
According to the description.

Could not create the vmPool as expected.

Comment 2 Sandro Bonazzola 2015-11-04 11:44:10 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.


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