Bug 918588

Summary: Disk is reported as removed before task deleteImage is cleared
Product: Red Hat Enterprise Virtualization Manager Reporter: Katarzyna Jachim <kjachim>
Component: vdsmAssignee: Ayal Baron <abaron>
Status: CLOSED DUPLICATE QA Contact: Katarzyna Jachim <kjachim>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.3CC: abaron, bazulay, hateya, iheim, jlibosva, lpeer, ncredi, ykaul
Target Milestone: ---Keywords: TestBlocker
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-08 20:57:48 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
vdsm log
none
engine log none

Description Katarzyna Jachim 2013-03-06 14:47:20 UTC
Created attachment 706021 [details]
vdsm log

Description of problem:
After the test finish we tried to remove all created datacenters. We started with removing VMs, then removed VM template (which finished with success), then tried to deactivate master storage domain. The last operation failed because there was still some tasks on pool. The only remaining task was task with id 
ebf41dcd-ebf7-4217-ad37-83787b97b978, 'deleteImage' invoked during removing VM template. Task was actually finished, but was not removed from the pool (was removed some miliseconds later).

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


How reproducible:
http://jenkins.qa.lab.tlv.redhat.com:8080/view/Storage/view/3.1/job/3.1-storage_direct-lun_sanity-iscsi-rest/226/


Steps to Reproduce:
1. create an iSCSI datacenter
2. create a VM
3. stop the VM
4. attach a disk to the VM
5. start and stop the VM
6. create a template based on the VM, wait until it is created
7. remove the VM
8. remove the template
9. try to deactivate master storage domain

The last step should be done right after the previous one

Actual results:
Deactivation of the master storage domain failed.

Expected results:
Deactivation should pass, tasks related to a template should be removed from the pool before template is reported as removed.

Additional info:

Comment 1 Katarzyna Jachim 2013-03-06 14:47:44 UTC
Created attachment 706022 [details]
engine log

Comment 5 Ayal Baron 2013-03-08 20:57:48 UTC
The object no longer exists per se, but in the background we're going on freeing up the space this is not a bug.
In fact going forward we want 'delete' to be just a removal of a tag (subsecond) in vdsm and then in the background vdsm will go on clearing things up.  Since these operations are potentially (very) long yet do not require blocking other operations this is the expected behaviour.
When moving the domain to maintenance you need to track the correct thing (check there are no tasks) and not assume specific implementation.  Tasks are not necessarily tied to specific objects (general maintenance tasks).

Comment 6 Jakub Libosvar 2013-03-13 14:06:03 UTC
*** Bug 920220 has been marked as a duplicate of this bug. ***

Comment 7 Haim 2013-03-18 12:27:56 UTC
Ayal, its indeed a bug, duplicate of BZ916652

*** This bug has been marked as a duplicate of bug 916652 ***