Bug 1700389

Summary: allocatevm action for pre-started pools results with error
Product: [oVirt] ovirt-engine Reporter: Polina <pagranat>
Component: BLL.VirtAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.3.2CC: bugs, lrotenbe, lsvaty, rbarry, srosenbe
Target Milestone: ovirt-4.3.9Keywords: Automation, Regression, TestOnly
Target Release: ---Flags: pm-rhel: ovirt-4.3+
pm-rhel: blocker?
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-06 06:52:59 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1635337    
Attachments:
Description Flags
engine.log
none
engine from last master build
none
Screen shot showing that the rest api allocatevm command succeeds. none

Description Polina 2019-04-16 12:48:50 UTC
Description of problem: allocatevm action for pre-started pools results with error and also, such pool can't be removed from the engine with the same error.

Version-Release number of selected component (if applicable): ovirt-engine-4.3.3.1-0.1.el7.noarch

How reproducible:100%

Steps to Reproduce:
1. Create pool with prestarted vm (I created pool with two vms , both prestarted)
2. try to allocate  with rest API :

POST https://{{host}}/ovirt-engine/api/vmpools/9e605316-cddf-4bd1-9f0e-e8f2f10aed1d/allocatevm

body: 

<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
</action>

Actual results: brings error  [Can not allocate and run VM from VM-Pool. Related operation is currently in progress. Please try again later.].
Also, such a pool could be never removed from the engine with the same error.

Expected results: no error


Additional info:

Comment 1 RHEL Program Management 2019-04-16 14:20:11 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Michal Skrivanek 2019-04-17 04:40:46 UTC
logs?

Comment 3 Polina 2019-04-17 06:48:44 UTC
Created attachment 1555739 [details]
engine.log

engine.log attached

Comment 4 Polina 2019-04-17 12:18:36 UTC
Created attachment 1555886 [details]
engine from last master build

re-tested on upstream build ovirt-engine-4.3.3.6-0.0.master.20190416081415.git5975555.el7.noarch (updated today ).
bug still happens. 
new log attached .

Comment 5 Liran Rotenberg 2019-04-20 19:51:28 UTC
This is also harming vm-pools that were made in 4.2.
After the upgrade to 4.3 (ovirt-engine-4.3.3.5-0.1.el7.noarch), pre-started vm-pools can't be allocated.

Comment 6 Steven Rosenberg 2020-02-17 12:11:02 UTC
Created attachment 1663505 [details]
Screen shot showing that the rest api allocatevm command succeeds.

Created a pool with 2 VMs prestarted and as per the screen shot sent the allocatevm rest api message and it succeeded. 

Reviewed an issue where the the VMs did not seem to prestart, but on further investigation found that the VMs do eventually restart after a few minutes. This may be advisable being that the VMs need some time to move from an Image Locked status while being created to a Down status as an indicator for prestarting the VM. One may consider however reducing the polling time of the pool monitor, but this would be a separate issue.

Comment 7 Ryan Barry 2020-02-17 14:16:57 UTC
I read this as "QE, please re-test". Correct?

Comment 8 Steven Rosenberg 2020-02-17 15:29:25 UTC
(In reply to Ryan Barry from comment #7)
> I read this as "QE, please re-test". Correct?

Correct.

Comment 9 Michal Skrivanek 2020-03-19 13:57:29 UTC
(In reply to Steven Rosenberg from comment #8)
> (In reply to Ryan Barry from comment #7)
> > I read this as "QE, please re-test". Correct?
> 
> Correct.

then either move bug to ON_QA or ask Polina kindly via needinfo

Polina, can you please retest as Steven requested?

Comment 10 Polina 2020-03-19 16:06:12 UTC
re-tested on  
http://bob-dr.lab.eng.brq.redhat.com/builds/4.3/rhv-4.3.9-7

and on
http://bob-dr.lab.eng.brq.redhat.com/builds/4.4/rhv-4.4.0-23

works correctly. no error. 
correct response 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <status>complete</status>
    <vm href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c" id="5bc73c95-f9e1-4fc1-ab46-e39a3173432c">
        <actions>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/detach" rel="detach"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/export" rel="export"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/ticket" rel="ticket"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/previewsnapshot" rel="previewsnapshot"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/reordermacaddresses" rel="reordermacaddresses"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/thawfilesystems" rel="thawfilesystems"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/undosnapshot" rel="undosnapshot"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/commitsnapshot" rel="commitsnapshot"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/reboot" rel="reboot"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/migrate" rel="migrate"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/cancelmigration" rel="cancelmigration"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/clone" rel="clone"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/logon" rel="logon"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/maintenance" rel="maintenance"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/freezefilesystems" rel="freezefilesystems"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/shutdown" rel="shutdown"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/start" rel="start"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/stop" rel="stop"/>
            <link href="/ovirt-engine/api/vms/5bc73c95-f9e1-4fc1-ab46-e39a3173432c/suspend" rel="suspend"/>
        </actions>
    </vm>
</action>

Comment 11 RHEL Program Management 2020-03-20 10:27:38 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 12 Steven Rosenberg 2020-03-22 10:02:10 UTC
(In reply to RHEL Program Management from comment #11)
> This bug report has Keywords: Regression or TestBlocker.
> Since no regressions or test blockers are allowed between releases, it is
> also being identified as a blocker for this release. Please resolve ASAP.

Polina verified this in Comment 10. Should be closed.

Comment 13 Ryan Barry 2020-03-22 10:07:04 UTC
Not closed, but new milestone

Comment 14 Lukas Svaty 2020-03-23 07:39:29 UTC
based on comment#10

Comment 15 Sandro Bonazzola 2020-04-06 06:52:59 UTC
This bugzilla is included in oVirt 4.3.9 release, published on March 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.3.9 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.