Red Hat Bugzilla – Bug 1315116
Removing Data Center orphans Cluster and Hosts in the DB
Last modified: 2016-03-17 11:03:57 EDT
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-188.8.131.52 (wasn't an option in the version list above)
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.
Data center is gone, but the GUI still acts as if the hosts and clusters under it are still there.
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!
Any chance you still have the logs? If yes, could you please attach them?
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