Bug 1450866

Summary: Remove snapshot with multiple disks on the same SD fails with 'General command validation failure'
Product: [oVirt] ovirt-engine Reporter: Lilach Zitnitski <lzitnits>
Component: BLL.StorageAssignee: Benny Zlotnik <bzlotnik>
Status: CLOSED CURRENTRELEASE QA Contact: Lilach Zitnitski <lzitnits>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: amureini, bugs, bzlotnik, lzitnits
Target Milestone: ovirt-4.2.0Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 10:44:13 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 Lilach Zitnitski 2017-05-15 10:16:57 UTC
Description of problem:
Removing snapshot that contains read only disks fails with the error:
General command validation failure.
While snapshot with read-write disks can be removed without any errors. 

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170512134658.git7d2e44a.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. create new vm
2. add read-only disk or disks to the vm and activate them
3. create snapshot with all the disks
4. try to remove this snapshot

Actual results:
snapshot can't be removed 

Expected results:
snapshot is gone

Additional info:

ovirt-engine

2017-05-15 13:08:25,074+03 ERROR [org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand] (default task-5) [5dc49224-4cd5-4669-9345-81f7ec743040] Error during ValidateFailure.: java.lang.IllegalStateException: Duplicate key SubchainInfo:{storageDomainId='1fcd4803-1fe6-4526-a778-aecec4f3f235', baseImage='org.ovirt.engine.core.common.businessentities.storage.DiskImage@ed4aa2d8', topImage='org.ovirt.engine.core.common.businessentities.storage.DiskImage@a22211d4', baseImageGeneration='null'}

Comment 1 Lilach Zitnitski 2017-05-15 10:17:32 UTC
Created attachment 1278912 [details]
engine.log

Comment 2 Allon Mureinik 2017-05-15 10:46:47 UTC
(In reply to Lilach Zitnitski from comment #0)



> Description of problem:
> Removing snapshot that contains read only disks fails with the error:
> General command validation failure.
> While snapshot with read-write disks can be removed without any errors. 
> 
> Version-Release number of selected component (if applicable):
> ovirt-engine-4.2.0-0.0.master.20170512134658.git7d2e44a.el7.centos.noarch
Lilach - does this happen in 4.1.z too?

> 
> 2017-05-15 13:08:25,074+03 ERROR
> [org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand] (default task-5)
> [5dc49224-4cd5-4669-9345-81f7ec743040] Error during ValidateFailure.:
> java.lang.IllegalStateException: Duplicate key
> SubchainInfo:{storageDomainId='1fcd4803-1fe6-4526-a778-aecec4f3f235',
> baseImage='org.ovirt.engine.core.common.businessentities.storage.
> DiskImage@ed4aa2d8',
> topImage='org.ovirt.engine.core.common.businessentities.storage.
> DiskImage@a22211d4', baseImageGeneration='null'}
Benny - the stacktrace seems to be related to the changes you made as part of the fix for bug 1414472.
can you take a look please?

Comment 3 Red Hat Bugzilla Rules Engine 2017-05-15 10:46:53 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Lilach Zitnitski 2017-05-15 10:50:47 UTC
Allon, No. I have 4.1.2 environment and it didn't reproduce there.

Comment 5 Lilach Zitnitski 2017-05-15 10:51:32 UTC
Sorry removed Benny's needinfo by mistake.

Comment 6 Allon Mureinik 2017-05-15 10:54:11 UTC
(In reply to Lilach Zitnitski from comment #4)
> Allon, No. I have 4.1.2 environment and it didn't reproduce there.
Thanks, Lilach. This adds credence to the assumption that:

(In reply to Allon Mureinik from comment #2)
> > 2017-05-15 13:08:25,074+03 ERROR
> > [org.ovirt.engine.core.bll.snapshots.RemoveSnapshotCommand] (default task-5)
> > [5dc49224-4cd5-4669-9345-81f7ec743040] Error during ValidateFailure.:
> > java.lang.IllegalStateException: Duplicate key
> > SubchainInfo:{storageDomainId='1fcd4803-1fe6-4526-a778-aecec4f3f235',
> > baseImage='org.ovirt.engine.core.common.businessentities.storage.
> > DiskImage@ed4aa2d8',
> > topImage='org.ovirt.engine.core.common.businessentities.storage.
> > DiskImage@a22211d4', baseImageGeneration='null'}
> Benny - the stacktrace seems to be related to the changes you made as part
> of the fix for bug 1414472.

Comment 7 Benny Zlotnik 2017-05-16 08:04:41 UTC
Since the bug is related to having multiple disks on the same storage domain, the
updated steps to reproduce are the following:
1. Create a VM with 2 disks
2. Create a snapshot with these 2 disks
3. Attempt to remove the snapshot

Comment 8 Allon Mureinik 2017-06-13 09:28:19 UTC
This has been merged a long time ago, moving to MODIFIED.

Comment 9 Lilach Zitnitski 2017-07-13 06:20:30 UTC
--------------------------------------
Tested with the following code:
----------------------------------------
ovirt-engine-4.2.0-0.0.master.20170711205308.git8e7af78.el7.centos.noarch
vdsm-4.20.1-176.gitecbab6b.el7.centos.x86_64

Tested with the following scenario:

Steps to Reproduce:
1. Create a VM with 2 disks
2. Create a snapshot with these 2 disks
3. Attempt to remove the snapshot

Actual results:
snapshot is gone

Expected results:

Moving to VERIFIED!

Comment 10 Sandro Bonazzola 2017-12-20 10:44:13 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.