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

Bug 1051124

Summary: Can't delete domain
Product: [Retired] oVirt Reporter: Juan Pablo Lorier <jplorier>
Component: ovirt-engine-webadminAssignee: Maor <mlipchuk>
Status: CLOSED CURRENTRELEASE QA Contact: Carlos Mestre González <cmestreg>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.3CC: acanan, amureini, bugs, ecohen, iheim, jplorier, kgoldbla, mgoldboi, mlipchuk, rbalakri, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:30:28 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
the log of the day none

Description Juan Pablo Lorier 2014-01-09 17:54:48 UTC
Description of problem:

I intend to destroy a DC because ovirtmgmt lost vlan tag and can't readd it with active hosts (not even in maintenance).
If I try to remove the gluster data domain, it complaints that I have to delete all vms firts, but if I try to delete the vms, it complaints the data domain is down, so I'm stuck.


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


How reproducible:

Steps to Reproduce:
1.Set data domain as down with vms in the DC
2.try to remove the domain or the vms
3.

Actual results:

Get stuck in a dead lock

Expected results:

Be able to delete the domain as I know it will delete the vms

Additional info:

Comment 1 Itamar Heim 2014-01-12 08:42:49 UTC
setting target release to current version for consideration and review. please do not push non-RFE bugs to an undefined target release to make sure bugs are reviewed for relevancy, fix, closure, etc.

Comment 2 Allon Mureinik 2014-01-12 15:39:03 UTC
Juan Pablo - can you please attach the relevant engine/vdsm logs?

Comment 3 Allon Mureinik 2014-01-12 15:39:45 UTC
Maor, didn't you handle something similar a while ago?

Comment 4 Juan Pablo Lorier 2014-01-16 15:51:55 UTC
I'm sorry for the delay, but was attending other issues.
I'm attaching todays part of the engine log (vdsm has no info at all for this operation)

Comment 5 Juan Pablo Lorier 2014-01-16 16:11:44 UTC
Created attachment 851156 [details]
the log of the day

Here (at the latest records) I try first to remove a vm from the gluster cluster and cna't as the gluster storage domain is down. Then I try to remove the gluster storage domain and can't as it complaint it has vms in it.

Comment 6 Ayal Baron 2014-02-17 20:47:13 UTC
(In reply to Juan Pablo Lorier from comment #5)
> Created attachment 851156 [details]
> the log of the day
> 
> Here (at the latest records) I try first to remove a vm from the gluster
> cluster and cna't as the gluster storage domain is down. Then I try to
> remove the gluster storage domain and can't as it complaint it has vms in it.

Did you try to 'destroy' the domain?
destroy is meant to allow you to get rid of a storage domain from the engine when you have no access to the data (i.e. VMs would not be deleted from the storage and it's up to you as the user to clean up afterwards).  But it is generally recommended to properly cleanup (hence it is a separate action available through context sensitive menu).

Comment 7 Juan Pablo Lorier 2014-02-18 10:36:50 UTC
I did at a last resource. Even the, things didn't work as well as spected as there were a lot of things that were left behind by the destroy. Pretty much, everything related to the gluster volume was not removed from the database (name of the cluster, bricks, and the volume itself) so I had to manually remove them from the database in order to reconstruct the DC.
What I want with this but is that the dependencies of the components in a DC are reviewed to contemplate a path to "cleanly" remove the VMs from a storage in down state so the storage can be removed, and in the case of a glusterfs domain, been able to detach the volume somehow. I prefer this way to destroying the hole DC and then have to rebuild it from the top.
Regards,

Comment 8 Maor 2014-07-05 23:20:25 UTC
The behaviour of detach has been changed in version 3.5.
You should be able to detach a storage domain/Remove a Data Center with VMs/Templates and disks in it.
Those entities should be removed from the DB.
Take in notice that the cluster and the Host will still exist in the setup and should be attached to another DC

Comment 9 Juan Pablo Lorier 2014-07-07 13:40:08 UTC
Ok, thanks. I'll try that as soon as we upgrade to 3.5.
Regards

Comment 10 Kevin Alon Goldblatt 2014-08-11 15:18:11 UTC
I was able to detach the Storage Domain. I had to turn off the VM's before moving the Domain to maintainance mode. Moving to Verify

Comment 11 Sandro Bonazzola 2014-10-17 12:30:28 UTC
oVirt 3.5 has been released and should include the fix for this issue.