Bug 1002549 - [RESTAPI] API return operation failed for restoring snapshot, even when action succeed.
[RESTAPI] API return operation failed for restoring snapshot, even when actio...
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.5.0
Assigned To: Arik
meital avital
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-29 08:37 EDT by Ondra Machacek
Modified: 2014-09-28 02:38 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-31 04:29:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
engine.log (34.48 KB, text/plain)
2013-09-05 03:46 EDT, Ondra Machacek
no flags Details

  None (edit)
Description Ondra Machacek 2013-08-29 08:37:15 EDT
Description of problem:


Version-Release number of selected component (if applicable):
is11

How reproducible:
always

Steps to Reproduce:
1. Create vm with disk and create snapshot.
2. Assing user1 UserVmManger on this vm.
3. Via api call restore command
curl -k -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -H "Filter: $filter"\
     -d "<action><async>false</async><grace_period><expiry>10</expiry></grace_period></action>" \
     -u $U $URL/vms/01f36034-01d3-4f34-9aa7-b2cdcab3210e/snapshots/2c6838c2-7aa9-4588-9c58-e9a3ff7099bd/restore

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <status>
        <state>failed</state>
    </status>
    <fault>
        <reason>Operation Failed</reason>
        <detail>[Cannot preview Snapshot. VM is previewing a Snapshot.]</detail>
    </fault>
</action>


Expected results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <status>
        <state>complete</state>
    </status>
</action>

Additional info:
Comment 1 Ayal Baron 2013-09-04 09:01:58 EDT
logs?
Comment 2 Ondra Machacek 2013-09-05 03:46:14 EDT
Created attachment 794043 [details]
engine.log

actual result is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <async>false</async>
    <grace_period>
        <expiry>10</expiry>
    </grace_period>
    <status>
        <state>failed</state>
    </status>
    <fault>
        <reason>Operation Failed</reason>
        <detail>[Cannot revert to Snapshot. At least one of the VMs is not down.]</detail>
    </fault>
</action>

the one I provide in comment 1 is wrong, sorry.
Comment 4 Michal Skrivanek 2014-03-31 04:29:41 EDT
seems to be working now, couldn't reproduce. Using the functionality often…
please reopen if you happen to reproduce

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