Bug 1327882

Summary: Updating prestarted vms in a pool to the same value may cause powering up of extra vms
Product: [oVirt] ovirt-engine Reporter: sefi litmanovich <slitmano>
Component: Backend.CoreAssignee: Nobody <nobody>
Status: CLOSED WONTFIX QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: low    
Version: 3.6.5.1CC: bugs, tjelinek
Target Milestone: ---Flags: sbonazzo: ovirt-4.2-
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-14 13:42:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
engine log none

Description sefi litmanovich 2016-04-17 13:47:24 UTC
Created attachment 1148067 [details]
engine log

Description of problem:

In automation testing due to a mistake on case setup I created a vm pool with 3 vms and 2 prestarted vms instead of 0. The test case is -> update the vm pool and set prestarted vms to 2. Due to the fact that the automation runs very fast, the update vm pool action was invoked when the 2 prestarted vms were powering up (after creation of the pool) and probably due to some race condition the job that checks the amount of current prestarted vms in the pool did not recognize the vms powering up and invoked the run of the 3rd vm.

I re produced this scenario manually by again creating a vm pool with 3 vms 2 prestarted, and during the 2 vms' powering up called PUT via API:

https://violet-rhel.scl.lab.tlv.redhat.com/ovirt-engine/api/vmpools/{pool_id}

<vmpool>
<prestarted_vms>2</prestarted_vms>
</vmpool>

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

How reproducible:
Sometimes

Steps to Reproduce:
1. Create vm pool with e.g 3 vms and 2 prestarted vms.
2. When the 2 vms are powering up, update the pool and set prestarted vms to 2 (basically not changing anything)

Actual results:
If the update was fast enough, it will invoke the starting up of the 3rd vm in the pool.


Expected results:
Nothing changes in the pool, the 2 prestarted vms are up and the 3rd is down.

Additional info:

Comment 1 Michal Skrivanek 2016-12-21 09:08:47 UTC
The bug was not addressed in time for 4.1. Postponing to 4.2

Comment 2 Tomas Jelinek 2017-07-14 13:42:01 UTC
Closing due to capacity - please feel free to reopen if it is important for your use case.