Red Hat Bugzilla – Bug 1253338
[API] restore snapshot via API results in snapshot being stuck on "In preview" status
Last modified: 2016-02-10 14:35:16 EST
Created attachment 1062591 [details]
restore snapshot relevant part in engine log
Description of problem:
trying to restore snapshot via rest api results in snapshot being stuck on "In preview" status
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a vm with disk
2. Create snapshot.
3. restore snapshot:
snapshot is stuck on "In preview" mode forever.
snapshot moves to "In previewe" and shortly after commits the snapshot.
The "restore" operation is performed by the RESTAPI in two sequential steps:
1. The RESTAPI runs the "TryBackToAllSnapshotsOfVm" command and waits for the completion of the job by this operation.
2. The RESTAPI runs the "RestoreAllSnapshot" action.
What happens in this case is that the job returned by the "TryBackToAllSnapshotsOfVm" command never finishes, it is always in status "STARTED", thus the RESTAPI will never get out of step 1.
Note also that ideally the RESTAPI shouldn't coordinate two backend actions, like in this case. Consider adding a single backend command that performs these two steps.
Moving to "infra", as it looks like a generic caching issue in the DAO layer. See bug 1254230, which is probably a duplicate.
Verified according to steps in the description.
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.