Bug 1814197

Summary: [CNV&RHV] when provider is remover DC is left behind and active
Product: Red Hat Enterprise Virtualization Manager Reporter: Pavol Brilla <pbrilla>
Component: ovirt-engineAssignee: Piotr Kliczewski <pkliczew>
Status: CLOSED ERRATA QA Contact: Pavol Brilla <pbrilla>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.0CC: lleistne, masayag, mperina, mtessun
Target Milestone: ovirt-4.4.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.0_beta3 rhv-4.4.0-30 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-04 13:21:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine log form time of operation none

Description Pavol Brilla 2020-03-17 10:44:28 UTC
Description of problem:
When I was removing old cnv provider from engine DC  was left untouched by removal of provider

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

How reproducible:
100%

Comment 1 Pavol Brilla 2020-03-17 11:36:18 UTC
Created attachment 1670784 [details]
engine log form time of operation

Comment 2 Moti Asayag 2020-03-17 12:13:44 UTC
With current design, kubevirt data-center is used to serve all of kubernetes clusters.
The data-center is being added and marked as initialized.

On Kubevirt provider removal, we remove all of that cluster resources (cluster, hosts, vms, templates and networks).
However the data-center remains.

If we wish to remove the 'kubevirt' data-center when the last kubevirt provider is removed, we need to add that to:

https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/provider/cluster/KubevirtProviderProxy.java#L309

Comment 5 Pavol Brilla 2020-04-21 11:09:19 UTC
Once all kubevirt/cnv providers are removed, DC is removed as well.

	
Data Center kubevirt was removed by SYSTEM

on ovirt-engine.noarch     4.4.0-0.33.master.el8ev

Comment 7 errata-xmlrpc 2020-08-04 13:21:58 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 (Important: RHV Manager (ovirt-engine) 4.4 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:3247