Bug 1032075

Summary: Activating an active host does not return an error
Product: Red Hat Enterprise Virtualization Manager Reporter: Ohad Basan <obasan>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED NOTABUG QA Contact: Elena <edolinin>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.4.0CC: acathrow, bazulay, edolinin, eedri, emesika, gklein, iheim, knesenko, lpeer, mpastern, obasan, pstehlik, Rhev-m-bugs, srevivo, yeylon
Target Milestone: ---Keywords: AutomationBlocker, AutomationTriaged, Triaged
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-25 13:36:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ohad Basan 2013-11-19 14:00:37 UTC
Description of problem:

when activating an active host the expected REST call should be :
2013-11-19 13:43:13,036 - MainThread - hosts - DEBUG - Response body for action request is: 
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <status>
        <state>failed</state>
    </status>
    <fault>
        <reason>Operation Failed</reason>
        <detail>[Cannot activate Host. Host in Up status.]</detail>
    </fault>
</action>

on RHEV3.4 nothing returns

Comment 2 Eli Mesika 2013-11-20 15:25:41 UTC
Unable to reproduce 

Sending a POST request to an active Host with the following body 

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

Resulted in the following respond :

<action>
<async>false</async>
<grace_period>
<expiry>10</expiry>
</grace_period>
<status>
<state>failed</state>
</status>
<fault>
<reason>Operation Failed</reason>
<detail>[Cannot activate Host. Host in Up status.]</detail>
</fault>
</action>

Looking in the code , there is a canDoAction code that generates an error when Activate is called and the Host is UP

Please check that Host did not change status between the time the last status is retrieved and the call to activate the host

Comment 3 Ohad Basan 2013-11-20 16:19:56 UTC
I See it also in other tests.
meaning it's not specific to activate hosts
for example, set host to maintenance also doesn't respond

Comment 5 Eli Mesika 2013-11-21 13:05:31 UTC
related to the caching mechanism added lately.
Please check again after the following revert patches are merged :

http://gerrit.ovirt.org/#/c/21473/
http://gerrit.ovirt.org/#/c/21474/
http://gerrit.ovirt.org/#/c/21475/
http://gerrit.ovirt.org/#/c/21476/

Comment 6 Eyal Edri 2013-11-21 13:14:19 UTC
kiril - can you update status on this after fixed qe code?

Comment 8 Eli Mesika 2013-11-24 09:25:13 UTC
Please check if still hapenning after reverting Host caching 

Thanks

Comment 9 Eyal Edri 2013-11-24 10:09:39 UTC
it's still happening.
we believe it's bug in QE code, following ticket opened on comment #7.

Comment 10 Eli Mesika 2013-11-25 10:09:03 UTC
Elena , please update if this is a QE BZ so I can close it