Bug 1002549 - [RESTAPI] API return operation failed for restoring snapshot, even when action succeed.
Summary: [RESTAPI] API return operation failed for restoring snapshot, even when actio...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Arik
QA Contact: meital avital
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-29 12:37 UTC by Ondra Machacek
Modified: 2014-09-28 06:38 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-31 08:29:41 UTC
oVirt Team: ---
Target Upstream Version:


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

Description Ondra Machacek 2013-08-29 12:37:15 UTC
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 13:01:58 UTC
logs?

Comment 2 Ondra Machacek 2013-09-05 07:46:14 UTC
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 08:29:41 UTC
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.