+++ This bug was initially created as a clone of Bug #1055024 +++
Description of problem:
I created a new datacenter, added a cluster, host, etc. At that point, I no longer needed the Default datacenter that was created at install (no hosts were left in it), and so I deleted it. When I moved to the System > Clusters tab, I noted that there still was a "Default" cluster defined. I tried to delete it (the "Remove" link was not greyed) and when I did, it threw an error as follows:
Cannot remove default Host Cluster.
Cannot remove Cluster. One or more Template(s) are still associated with it.
When I moved to the Templates tab, there is indeed a template (named "Blank"), but when highlighted, the "Remove" link remains greyed out.
Therefore, I cannot delete the template, and the Cluster that is associated with it.
Version-Release number of selected component (if applicable):
oVirt engine version 3.3.2-1.el6
Do not have another system to reproduce on.
Steps to Reproduce:
1. Highlight the Default datacenter, click "remove" link. The datacenter is deleted.
2. Move to the Clusters tab, see that there is a Default cluster, click the "Remove" link, see the error.
3. Move to the Templates tab, see that there is a template, select it, notice that the "Remove" link remains greyed out.
Deleting the Default datacenter should ensure that all associated Clusters and Templates (etc.) that are encapsulated by it are (auto?) removed (or exported etc.) before allowing the deletion.
--- Additional comment from Michal Skrivanek on 2014-02-27 05:03:41 EST ---
the blank template is sort of hardcoded and cannot be removed nor changed.
With instance types feature merged this limitation may go away (be able to detach from cluster) - or at least this will be doable easily
--- Additional comment from Michal Skrivanek on 2014-08-14 09:44:13 EDT ---
It does make sense to keep it orphaned, but it needs even more workarounds in the code to treat it in a special way.
we should revisit this after bug 1130174 gets implemented.
I suppose this will be done as part of the changes in bug 1130174 but still rather track this separately
I want to see that I understand the flow I should verify:
1. delete default datacenter - should work if no cluster is used under it.
2. delete default cluster - should work as well.
3. delete blank template - this shouldn't be possible anyway.
4. If there were other templates on that default DC - are they suppose to automatically be removed upon dc removal? or is dc removal not allowed until templates are first removed? what's the flow here?
1, 2, 3: correct
4: the DC should not be allowed to be removed
Verified with ovirt-engine-3.6.0-0.0.master.20150627185750.git6f063c1.el6.noarch according to description and comments 3-4.
behaviour conforms with https://bugzilla.redhat.com/show_bug.cgi?id=1130174 and the Blank template is a standalone template and cannot be deleted.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.