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

Bug 1659826

Summary: Bad conflict message when removing a VM that has a snapshot disk attached to another VM
Product: [oVirt] ovirt-engine Reporter: Elad <ebenahar>
Component: BLL.StorageAssignee: Ahmad Khiet <akhiet>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, frolland, tnisan
Target Milestone: ovirt-4.3.4Keywords: Automation
Target Release: 4.3.3.1Flags: rule-engine: ovirt-4.3+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.3.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-29 12:18:17 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 Elad 2018-12-16 20:11:09 UTC
Created attachment 1514922 [details]
engine.log

Description of problem:
Bad conflict message when removing a VM that has a snapshot disk attached to another VM

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Attach snapshot disk of VM1 to VM2
2. Delete VM2


Actual results:

Operation Failed: [Cannot remove VM. The following VM's disks snapshots are attached to other
 VMs (Disk Alias/Snapshot Description/VM attached to):

 ${disksInfo} 

Please detach them from those VMs and try again., $disksinfo disk create and attach disk 1621191282 ,snap operations 1621383339, golden env mixed virtio 1 0


Expected results:
Fix conflict message

Additional info:
engine.log attached

Comment 1 Elad 2018-12-16 20:23:24 UTC
Correction:

Steps to Reproduce:
1. Attach snapshot disk of VM1 to VM2
2. Delete VM1

Comment 2 Elad 2018-12-16 21:16:29 UTC
Version-Release number of selected component (if applicable):
ovirt-engine-4.3.0-0.4.master.20181207184726.git7928cae.el7.noarch

Comment 3 Sandro Bonazzola 2019-01-28 09:34:42 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.

Comment 4 Ahmad Khiet 2019-04-04 13:25:43 UTC
when reproducing the bug, the following log lines printed:

INFO  Lock Acquired to object 'EngineLock:{exclusiveLocks='[cdcb0b94-4662-4cc..... 
WARN  Validation of action 'RemoveVm' failed for user .... 
INFO  Lock freed to object 'EngineLock:{exclusiveLocks='[cdcb0b94-4662-4ccc-b...
ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-2) [] Operation Failed: [Cannot remove VM. The following VM's disks snapshots are attached to other VMs (Disk Alias/Snapshot Description/VM attached to):
vm1_Disk1 ,vs1, vm2
Please detach them from those VMs and try again.]                                                


used REST to delete it: 

DELETE http://localhost:8080/ovirt-engine/api/vms/cdcb0b94-4662-4ccc-b3b7-cf27316c645e

Comment 5 Fred Rolland 2019-04-04 14:44:44 UTC
Elad,

Can someone check on latest build?
It did not reproduce for Ahmad.

Thanks

Comment 6 Elad 2019-04-04 15:33:35 UTC
Indeed, with latest build (4.3.3.1-0.1) it looks good:


2019-04-04 18:30:08,069 - MainThread - api_utils - ERROR - Failed to delete element NOT as expected:
        Status: 409
        Reason: Conflict
        Detail: [Cannot remove VM. The following VM's disks snapshots are attached to other VMs (Disk Alias/Snapshot Description/VM attached to):

 golden_mixed_virtio_template ,snap_Operations_0418251259, golden_env_mixed_virtio_2_1


Moving to VERIFIED