Bug 845020

Summary: [Storage][Live Snapshot] Snapshot creation fails if one of the disks deactivated.
Product: Red Hat Enterprise Virtualization Manager Reporter: Leonid Natapov <lnatapov>
Component: ovirt-engineAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: abaron, amureini, dyasny, fsimonce, hateya, iheim, lpeer, mlipchuk, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: SI15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 20:04:27 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 log none

Description Leonid Natapov 2012-08-01 13:51:10 UTC
[Storage][Live Snapshot] Snapshot creation fails if one of the disks deactivated.

VM with several disks. One of the VM's disks deactivated. VM is up and running.  Snapshot creation fails. Getting exception in the engine.
Same scenario works if VM is in down state.
Full engine log attached.
-----


d successfully: org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand
2012-08-01 16:38:45,590 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand] (pool-3-thread-47) [65cc29c0] START, SnapshotVDSCommand(vdsId = 8c2d052c-d971-11e1-8f37-ef768d07cea2, vmId=487702f3-2fc8-4f2e-89e2-dc61a8e15059), log id: 1c6d1ca4
2012-08-01 16:38:45,612 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-47) [65cc29c0] Failed in SnapshotVDS method
2012-08-01 16:38:45,612 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-47) [65cc29c0] Error code SNAPSHOT_FAILED and error message VDSGenericException: VDSErrorException: Failed to SnapshotVDS, error = Snapshot failed
2012-08-01 16:38:45,613 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-47) [65cc29c0] Command org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand return value
 Class Name: org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc
mStatus                       Class Name: org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc
mCode                         48
mMessage                      Snapshot failed


2012-08-01 16:38:45,618 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-47) [65cc29c0] Vds: purple-vds2
2012-08-01 16:38:45,620 ERROR [org.ovirt.engine.core.vdsbroker.VDSCommandBase] (pool-3-thread-47) [65cc29c0] Command SnapshotVDS execution failed. Exception: VDSErrorException: VDSGenericException: VDSErrorException: Failed to SnapshotVDS, error = Snapshot failed
2012-08-01 16:38:45,624 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.SnapshotVDSCommand] (pool-3-thread-47) [65cc29c0] FINISH, SnapshotVDSCommand, log id: 1c6d1ca4
2012-08-01 16:38:45,626 ERROR [org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand] (pool-3-thread-47) [65cc29c0] Wasnt able to live snpashot due to error: VdcBLLException: VdcBLLException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to SnapshotVDS, error = Snapshot failed, rolling back.
2012-08-01 16:38:45,634 ERROR [org.ovirt.engine.core.bll.CreateSnapshotCommand] (pool-3-thread-47) [597aeaa6] Ending command with failure: org.ovirt.engine.core.bll.CreateSnapshotCommand

Comment 1 Leonid Natapov 2012-08-01 13:52:27 UTC
Created attachment 601746 [details]
engine log

Comment 2 Leonid Natapov 2012-08-01 15:36:44 UTC
How to reproduce:
1.Create VM with several disks.
2.Start VM.
3.Deactivate one of the disks.
4.Try to create snapshot.

Comment 3 Ayal Baron 2012-08-08 10:01:15 UTC
Leonid, the scenario is: 
3. hot unplug
4. live snapshot
?

Comment 4 Leonid Natapov 2012-08-08 10:29:23 UTC
yes. the VM starts with all disk "activated". While it runs one of the disks is being deactivated.

Comment 5 Ayal Baron 2012-08-16 12:23:08 UTC
(In reply to comment #4)
> yes. the VM starts with all disk "activated". While it runs one of the disks
> is being deactivated.

Just to make sure, you wait until the disk is inactive before taking the snapshot, right?

Comment 6 Leonid Natapov 2012-08-16 12:43:18 UTC
right

Comment 7 Liron Aravot 2012-08-16 15:27:45 UTC
vdsm logs are needed as this is a vds error

Comment 8 Ayal Baron 2012-08-16 20:08:52 UTC
Ok, Liron has reproduced this on his setup.
Problem is that engine asks vdsm to take live snapshot of all disks including the ones the VM is not familiar with.
Fix is to send only the active disks.

Comment 9 Liron Aravot 2012-08-20 08:19:13 UTC
submitted patch http://gerrit.ovirt.org/#/c/7330/1

Comment 10 Allon Mureinik 2012-08-20 16:48:55 UTC
merged Change-Id: I27c32525794b4ec3c9d8c78f033a3c9d39da72b9

Comment 11 Leonid Natapov 2012-08-22 09:30:34 UTC
fixed. si15.