Bug 1342783

Summary: Remove snapshot with its disk attached to other VM should be blocked
Product: [oVirt] ovirt-engine Reporter: Raz Tamir <ratamir>
Component: BLL.StorageAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: acanan, ahino, amureini, bugs, tnisan, ylavi
Target Milestone: ovirt-4.0.1Keywords: Automation, Regression
Target Release: 4.0.1.1Flags: rule-engine: ovirt-4.0.z+
ylavi: blocker-
rule-engine: planning_ack+
amureini: devel_ack+
acanan: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 06:25:18 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 and vdsm logs none

Description Raz Tamir 2016-06-05 08:54:07 UTC
Created attachment 1164863 [details]
engine and vdsm logs

Description of problem:
As part of our impl of backup/restore api feature, we are attaching a snapshot's disk from vm 1 to vm 2.
The removal of the snapshot should be blocked (in 3.X) when the the snapshot's disk is attached to 2nd vm.


Version-Release number of selected component (if applicable):
ovirt-engine-4.0.0-0.7.master.el7ev.noarch
vdsm-4.18.0-0.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
Setup:
- 2 vm with 1 disk per vm (with OS)
- 1st vm with snapshot containing the boot disk
1. Attach the snapshot's disk of 1st vm to 2nd vm:
send POST request to /api/vms/<backup_vm_id>/disks :
<disk id='<source_vm_snapshot's_disk_id>'>
  <snapshot id='<source_vm_snapshot_id>'>
</disk>
2. Try to remove the snapshot
3.

Actual results:
The snapshot will remove successfully

Expected results:
The operation should be blocked with CDA

Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2016-06-05 09:33:37 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 2 Raz Tamir 2016-07-03 21:12:08 UTC
Verified on rhevm-4.0.2-0.2.rc1.el7ev.noarch

Comment 3 Sandro Bonazzola 2016-07-19 06:25:18 UTC
Since the problem described in this bug report should be
resolved in oVirt 4.0.1 released on July 19th 2016, it has been closed with a
resolution of CURRENT RELEASE.

For information on the release, and how to update to this release, follow the link below.

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

http://www.ovirt.org/release/4.0.1/