Bug 1315116 - Removing Data Center orphans Cluster and Hosts in the DB
Summary: Removing Data Center orphans Cluster and Hosts in the DB
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Frontend.WebAdmin
Version: 3.6.3.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: bugs@ovirt.org
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-06 23:33 UTC by lilbphotoman+redhat
Modified: 2019-12-07 16:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-17 15:03:57 UTC
oVirt Team: Infra
Embargoed:
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)

Description lilbphotoman+redhat 2016-03-06 23:33:26 UTC
Description of problem:
In the admin web GUI I removed a data center I was playing around with.  After I did that I am unable to add a host I had under that to another data center.  I received errors the name, address and some ID were already in use. Eventually found http://comments.gmane.org/gmane.comp.emulators.ovirt.user/13589 and removed the information from the 3 tables listed.  I also tried to create a cluster named the same as the cluster that existed under the data center and it too is saying it is already in use.  I did not have a list of tables to delete things from like the host so I am just going to move on and never name anything like that again.




Version-Release number of selected component (if applicable):
ovirt-engine-3.6.3.4 (wasn't an option in the version list above)
ovirt-engine-cli-3.6.2.0-1.el6.noarch
ovirt-engine-setup-plugin-vmconsole-proxy-helper-3.6.3.4-1.el6.noarch
ovirt-engine-vmconsole-proxy-helper-3.6.3.4-1.el6.noarch
ovirt-engine-tools-3.6.3.4-1.el6.noarch
ovirt-engine-backend-3.6.3.4-1.el6.noarch
ovirt-engine-jboss-as-7.1.1-1.el6.x86_64
ovirt-engine-lib-3.6.3.4-1.el6.noarch
ovirt-engine-setup-plugin-ovirt-engine-3.6.3.4-1.el6.noarch
ovirt-engine-sdk-python-3.6.3.0-1.el6.noarch
ovirt-engine-wildfly-8.2.1-1.el6.x86_64
ovirt-engine-wildfly-overlay-8.0.4-1.el6.noarch
ovirt-engine-websocket-proxy-3.6.3.4-1.el6.noarch
ovirt-engine-extensions-api-impl-3.6.3.4-1.el6.noarch
ovirt-engine-restapi-3.6.3.4-1.el6.noarch
ovirt-engine-userportal-3.6.3.4-1.el6.noarch
ovirt-engine-setup-base-3.6.3.4-1.el6.noarch
ovirt-engine-extension-aaa-jdbc-1.0.6-1.el6.noarch
ovirt-engine-setup-3.6.3.4-1.el6.noarch
ovirt-engine-3.6.3.4-1.el6.noarch
ovirt-engine-dbscripts-3.6.3.4-1.el6.noarch
ovirt-engine-webadmin-portal-3.6.3.4-1.el6.noarch
ovirt-engine-setup-plugin-ovirt-engine-common-3.6.3.4-1.el6.noarch
ovirt-engine-setup-plugin-websocket-proxy-3.6.3.4-1.el6.noarch


How reproducible:
I imagine fairly reproducible, but I haven't spend the time to reproduce it. I moved on after doing http://comments.gmane.org/gmane.comp.emulators.ovirt.user/13589.


Steps to Reproduce:
1. Remove data center
2. Attempt to add a host or cluster named the same as what was deleted under the data center.
3. Name the host something different, change it's hostname and DNS entries and it still won't work because of some other ID.

Actual results:
Data center is gone, but the GUI still acts as if the hosts and clusters under it are still there.


Expected results:
Removing a data center needs to check for children and either delete them too or block removing the data center until the user has deleted its children.

Also, having a tool/utility to see and/or delete orphaned things would be fantastic!


Additional info:

http://comments.gmane.org/gmane.comp.emulators.ovirt.user/13589

Comment 1 Tomas Jelinek 2016-03-07 07:56:50 UTC
Any chance you still have the logs? If yes, could you please attach them?
Thanx!

Comment 2 Martin Perina 2016-03-17 15:03:57 UTC
When you remove data center, only this data center is removed. All clusters and hosts of the data center are still visible and accessible in the UI. So even after data center is removed, you can still edit hosts and move it to different data center/cluster.

This data center force remove function is not intended to remove all hierarchy. If this is your goal, then you to do the removal manually using following steps:

1. Put host to maintenance and Remove the host for all host in all clusters of the desired data center
2. Remove all clusters of the desired data center
3. Remove the data center


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