Bug 1145002 - When Default datacenter deleted, cannot remove Default cluster or associated template
Summary: When Default datacenter deleted, cannot remove Default cluster or associated ...
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.4.1-1
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Tomas Jelinek
QA Contact: sefi litmanovich
Depends On: 1055024 1130174
TreeView+ depends on / blocked
Reported: 2014-09-22 08:09 UTC by Udayendu Sekhar Kar
Modified: 2020-04-15 14:09 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, when a user deleted the default data center, it was not possible to remove the default cluster or associated template afterwards. This has now been fixed.
Clone Of: 1055024
Last Closed: 2016-03-09 20:40:16 UTC
oVirt Team: Virt
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:0376 0 normal SHIPPED_LIVE Red Hat Enterprise Virtualization Manager 3.6.0 2016-03-10 01:20:52 UTC
oVirt gerrit 37904 0 master MERGED core: made it possible to edit the blank template 2020-11-24 01:06:05 UTC

Description Udayendu Sekhar Kar 2014-09-22 08:09:53 UTC
+++ 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

How reproducible:
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.

Actual results:

Expected results:
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 info:

--- 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.

Comment 1 Michal Skrivanek 2015-01-23 12:48:14 UTC
I suppose this will be done as part of the changes in bug 1130174 but still rather track this separately

Comment 3 sefi litmanovich 2015-06-01 14:23:29 UTC
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?

Comment 4 Tomas Jelinek 2015-06-02 05:59:53 UTC
1, 2, 3: correct
4: the DC should not be allowed to be removed

Comment 5 sefi litmanovich 2015-07-20 10:26:50 UTC
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.

Comment 8 errata-xmlrpc 2016-03-09 20:40:16 UTC
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.


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