Bug 1018554 - [restapi] undo snapshot preview through restapi commits snapshot instead of undoing preview
[restapi] undo snapshot preview through restapi commits snapshot instead of u...
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent
: ---
: 3.3.0
Assigned To: Ravi Nori
Gadi Ickowicz
: Reopened, Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-10-13 04:54 EDT by Gadi Ickowicz
Modified: 2016-02-10 14:20 EST (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-26 04:05:07 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: Triaged+

Attachments (Terms of Use)
engine and vdsm logs (323.81 KB, application/gzip)
2013-10-13 04:54 EDT, Gadi Ickowicz
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 1018554 None None None Never
oVirt gerrit 21282 None None None Never
oVirt gerrit 21646 None None None Never

  None (edit)
Description Gadi Ickowicz 2013-10-13 04:54:18 EDT
Created attachment 811690 [details]
engine and vdsm logs

Description of problem:
Attempting to undo a snapshot preview through RESTAPI commits that snapshot, removing any snapshots that were taken after the snapshot was originally created, just like committing the snapshot preview, instead of returning to the "Active before preview" snapshot and having all snapshots available.

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

How reproducible:

Steps to Reproduce:
1. Create a vm with a disk and take 2 snapshots
2. preview the first snapshot
3. Send REST post request to the following url:
with body:

Actual results:
first snapshot is no longer previewed but second snapshot disappears

Expected results:
second snapshot should be available

Additional info:
Comment 1 Maor 2013-10-20 11:02:29 EDT
The problem is in the REST and does not reproduce in the GUI.

A previewed snapshot has two rows in the volumes DB table, one is active the other is the previewed volume.

Since the user send the original snapshot id, the REST delegates it to the engine and cause the commit of the first snapshot.
The fix should be in the REST, by getting the other volume id (The temporary previewed volume) and send the correct volume id to the engine.
Comment 2 Ayal Baron 2013-10-28 08:31:31 EDT
This API was introduced by patch http://gerrit.ovirt.org/#/c/11163/
This functionality was broken from the day it was introduced and should be reverted.
Comment 4 Ravi Nori 2013-10-28 11:50:02 EDT
The exception is occuring because undo has been invoked on the wrong snapshot. It needs to be invoked on the snapshot that shows a description of "Active VM before preview". When undo is invoked from webadmin, the front end code takes care of choosing the right snapshot. When invoking from rest api please invoke the undo action on the snapshot with <type>preview</type>.
Comment 8 Michael Pasternak 2013-11-04 03:44:54 EST

*** This bug has been marked as a duplicate of bug 867339 ***
Comment 14 Michael Pasternak 2013-11-26 04:05:07 EST
this feature was reverted due to lack of appropriate infrastructure in the engine,
it will be reconsidered in one of the following versions, for more details please
follow RFE bug 867339.


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