Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1135953

Summary: Undoing a Preview snapshot fails
Product: [Retired] oVirt Reporter: Kevin Alon Goldblatt <kgoldbla>
Component: ovirt-engine-coreAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5CC: amureini, bugs, ecohen, gklein, iheim, kgoldbla, rbalakri, tnisan, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-3.5.0_rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:27:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine vdsm and server logs none

Description Kevin Alon Goldblatt 2014-09-01 10:02:31 UTC
Description of problem:
Custom Preview a snapshot with only some of the disks selected. Undo of the Preivew state fails and the Active VM remains Locked

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch
vdsm-4.16.1-6.gita4a4614.el6.x86_64

How reproducible:
a lot of the time

Steps to Reproduce:

1.add vm+disk_1 ,install Os and create snapshot_0
2.create a file on disk 1 (touch 1,dd into it 1 mega) and create snapshot_1
3.add disk_2+disk_3 ,create a file on disk_1(touch 1.1,dd into it 1 mega) create snapshot_2
4.create 1 file on each disk(touch 2->disk_2,touch 3->disk_3,dd into each 1 mega) and create snapshot_3
5.costume preview snapshot_1 ->disk_1 ,snapshot_2->disk_2, snapshot_3->disk_3 view the file on disks
6.undo preview,costume preview snapshot_2->disk_1&and disk_2 uncheck disk_3 flag,view files
7.undo preview>>>>>>>>>The Undo operation fails to complete

Actual results:
The Undo Preview operation does not complete and the Active VM remains locked

Expected results:
The Undo operation should have completed successfully

Additional info:
Output from engine log >>>>>>>>>>>>>>
-----------------------------------------------
2014-08-31 17:58:10,676 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DestroyImageVDSCommand] (ajp--127.0.0.1-8702-6) [57b833c8] FINISH, DestroyImageVDSCommand, log id: 2bba77e2
2014-08-31 17:58:10,682 INFO  [org.ovirt.engine.core.bll.CommandMultiAsyncTasks] (ajp--127.0.0.1-8702-6) [57b833c8] CommandMultiAsyncTasks::AttachTask: Attaching task f1584648-ed7a-403e-9c68-db0ce54f2950 to command c6c8d5f5-67f1-4c5d-899
1-3e09e2441669.
2014-08-31 17:58:10,690 INFO  [org.ovirt.engine.core.bll.tasks.AsyncTaskManager] (ajp--127.0.0.1-8702-6) [57b833c8] Adding task f1584648-ed7a-403e-9c68-db0ce54f2950 (Parent Command RestoreAllSnapshots, Parameters Type org.ovirt.engine.co
re.common.asynctasks.AsyncTaskParameters), polling hasn't started yet..
2014-08-31 17:58:10,721 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp--127.0.0.1-8702-6) [57b833c8] Correlation ID: 54c5556c, Job ID: 5b6c0865-52f0-4ff8-a04c-c2a1d281ffb2, Call Stack: null, Custom Even
t ID: -1, Message: Restoring VM vm15 from snapshot started by user admin.
2014-08-31 17:58:10,722 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (ajp--127.0.0.1-8702-6) [57b833c8] BaseAsyncTask::startPollingTask: Starting to poll task 5e2936bb-8a97-4ef9-8a33-51a3ec61c107.
2014-08-31 17:58:10,723 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (ajp--127.0.0.1-8702-6) [57b833c8] BaseAsyncTask::startPollingTask: Starting to poll task 0ad49007-150d-43f0-8a06-2c7f0a57f77d.
2014-08-31 17:58:10,723 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (ajp--127.0.0.1-8702-6) [57b833c8] BaseAsyncTask::startPollingTask: Starting to poll task f1584648-ed7a-403e-9c68-db0ce54f2950.
2014-08-31 17:58:16,682 INFO  [org.ovirt.engine.core.bll.tasks.AsyncTaskManager] (DefaultQuartzScheduler_Worker-42) [6b60dbe2] Polling and updating Async Tasks: 5 tasks, 3 tasks to poll now
2014-08-31 17:58:16,794 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (DefaultQuartzScheduler_Worker-42) [6b60dbe2] SPMAsyncTask::PollTask: Polling task 5e2936bb-8a97-4ef9-8a33-51a3ec61c107 (Parent Command RestoreAllSnapshots, Par
ameters Type org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters) returned status running.
2014-08-31 17:58:16,795 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (DefaultQuartzScheduler_Worker-42) [6b60dbe2] SPMAsyncTask::PollTask: Polling task 0ad49007-150d-43f0-8a06-2c7f0a57f77d (Parent Command RestoreAllSnapshots, Par
ameters Type org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters) returned status finished, result 'success'.
2014-08-31 17:58:16,800 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (DefaultQuartzScheduler_Worker-42) [6b60dbe2] BaseAsyncTask::onTaskEndSuccess: Task 0ad49007-150d-43f0-8a06-2c7f0a57f77d (Parent Command RestoreAllSnapshots, Pa
rameters Type org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters) ended successfully.

Comment 1 Kevin Alon Goldblatt 2014-09-01 10:04:11 UTC
Created attachment 933290 [details]
engine vdsm and server logs

Adding logs

Comment 2 Daniel Erez 2014-09-01 14:48:12 UTC
Hi Kevin,

What is the status of tasks in VDSM? If the tasks are still running it's not an engine issue.

Comment 3 Daniel Erez 2014-09-02 05:50:05 UTC
According to the logs [1], there was an error in RemoveDiskSnapshots which caused disks to remain locked (identical to bug 1134382 that should be fixed on the upcoming build). @Kevin - can you reproduce the described scenario without removing a disk snapshot?

[1] 2014-08-31 16:03:55,678 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-16) Correlation ID: 6a9409af, Call Stack: null, Custom Event ID: -1, Message: Failed to complete deletion of Disk 'vm13_Disk1' from snapshot(s) 'vm13_sn1' of VM 'vm13' (User: admin).
2014-08-31 16:03:55,679 ERROR [org.ovirt.engine.core.bll.tasks.CommandAsyncTask] (org.ovirt.thread.pool-8-thread-16) [within thread]: endAction for action type RemoveDiskSnapshots threw an exception.: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.RemoveDiskSnapshotTaskHandler.endWithFail

Comment 4 Daniel Erez 2014-09-03 17:56:28 UTC
Couldn't reproduce now that bug 1134382 is already fixed. Hence, moving to MODIFIED accordingly.

Comment 5 Allon Mureinik 2014-09-18 12:50:40 UTC
(In reply to Daniel Erez from comment #4)
> Couldn't reproduce now that bug 1134382 is already fixed. Hence, moving to
> MODIFIED accordingly.
Moving to ON_QA together with bug 1134382.

Comment 6 Kevin Alon Goldblatt 2014-09-18 15:54:32 UTC
Daniel. The VM referred to in the remove disk was vm13 and the disk referred to is vm13_Disk1.



My scenario here refers to is vm15. See below



Message: Restoring VM vm15 from snapshot started by user admin.
2014-08-31 17:58:10,722 INFO  [org.ovirt.engine.core.bll.tasks.SPMAsyncTask] (ajp--127.0.0.1-8702-6) [57b833c8] BaseAsyncTask::startPollingTask: Starting to poll task 5e2936bb-8a97-4ef9-8a33-51a3ec61c107.

Comment 7 Kevin Alon Goldblatt 2014-10-01 08:38:26 UTC
Moving to Verified!
I was able to preview and undo several snapshots successfully.  Tested with:
rhevm-3.5.0-0.13.beta.el6ev.noarch
vdsm-4.16.5-2.el6ev.x86_64

Comment 8 Sandro Bonazzola 2014-10-17 12:27:08 UTC
oVirt 3.5 has been released and should include the fix for this issue.