Bug 818091

Summary: [ovirt] [engine-core] force remove pool using wrong query and doesn't remove templates attached
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Tal Nisan <tnisan>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: abaron, acathrow, amureini, dron, dyasny, hateya, iheim, lnatapov, lpeer, mgoldboi, mkenneth, mkublin, Rhev-m-bugs, yeylon, ykaul
Target Milestone: ---   
Target Release: 3.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: SI8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 806886 Environment:
Last Closed: 2012-12-04 20:02:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 806886    
Bug Blocks:    

Description Dafna Ron 2012-05-02 08:14:27 UTC
cloning this to downstream since cleaning of templates in case of DC force remove or domain destroy is important enough. 

+++ This bug was initially created as a clone of Bug #806886 +++

Created attachment 572748 [details]
engine log.

Description of problem:

- pool with 1 domain
- 2 templates
- host
- domain is in problematic state 

Force remove data-base: templates remain, all other objects are deleted 

try remove cluster: 2012-03-26 13:46:09,838 WARN  [org.ovirt.engine.core.bll.RemoveVdsGroupCommand] (http--0.0.0.0-8080-2) CanDoAction of action RemoveVdsGroup failed. Reasons:VAR__TYPE__CLUSTER,VAR__ACTION__REMOVE,VMT_CANNOT_REMOVE_VDS_GROUP_VMTS_DETECTED
,VDS_GROUP_CANNOT_REMOVE_HAS_VM_POOLS

--- Additional comment from dron on 2012-05-01 04:45:34 EDT ---

destroy of domain will also not remove the templates under the domain. 
we can however remove them manually after the destroy.

Comment 1 mkublin 2012-06-10 13:15:18 UTC
*** Bug 806886 has been marked as a duplicate of this bug. ***

Comment 2 Tal Nisan 2012-06-20 14:06:49 UTC
http://gerrit.ovirt.org/5407

Comment 3 Tal Nisan 2012-06-24 13:49:20 UTC
*** Bug 833417 has been marked as a duplicate of this bug. ***

Comment 4 Haim 2012-06-25 15:07:16 UTC
tried to verify on SI7 - force-remove data-center doesn't remove template for data-center type local-fs. 


StatusCommand] (QuartzScheduler_Worker-42) [7ca2c556] Running command: SetStoragePoolStatusCommand internal: true. Entities affected :  ID: 98d1c31c-5d40-4556-
oolCommand] (ajp-/0.0.0.0:8009-8) [7afa3620] Running command: RemoveStoragePoolCommand internal: false. Entities affected :  ID: 98d1c31c-5d40-4556-8e4d-9874bf
QuartzScheduler_Worker-42) [7ca2c556] Checking autorecoverable hosts
QuartzScheduler_Worker-42) [7ca2c556] Autorecovering 0 hosts
QuartzScheduler_Worker-42) [7ca2c556] Checking autorecoverable hosts done
QuartzScheduler_Worker-42) [7ca2c556] Checking autorecoverable storage domains
QuartzScheduler_Worker-42) [7ca2c556] Autorecovering 0 storage domains
QuartzScheduler_Worker-42) [7ca2c556] Checking autorecoverable storage domains done
~

Comment 5 Haim 2012-06-25 15:09:44 UTC
*** Bug 814204 has been marked as a duplicate of this bug. ***

Comment 6 vvyazmin@redhat.com 2012-07-10 13:53:02 UTC
Verified on RHEVM 3.1 - SI9.1 

RHEV-M: rhevm-3.1.0-5.el6ev.noarch
VDSM: vdsm-4.9.6-17.0.el6.x86_64
LIBVIRT: libvirt-0.9.10-21.el6.x86_64
QEMV & KVM: qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64