Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1659826 - Bad conflict message when removing a VM that has a snapshot disk attached to another VM
Summary: Bad conflict message when removing a VM that has a snapshot disk attached to ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.3.0
Hardware: x86_64
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.3.4
: 4.3.3.1
Assignee: Ahmad Khiet
QA Contact: Elad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-16 20:11 UTC by Elad
Modified: 2019-05-29 12:18 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.3.3.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-29 12:18:17 UTC
oVirt Team: Storage
rule-engine: ovirt-4.3+


Attachments (Terms of Use)
engine.log (294.04 KB, application/gzip)
2018-12-16 20:11 UTC, Elad
no flags Details

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


Note You need to log in before you can comment on or make changes to this bug.