Bug 1855501 (OCPRHV-254) - OCPRHV-254: ovirt: destroy cluster should remove template
Summary: OCPRHV-254: ovirt: destroy cluster should remove template
Keywords:
Status: CLOSED ERRATA
Alias: OCPRHV-254
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Douglas Schilling Landgraf
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-10 03:11 UTC by Douglas Schilling Landgraf
Modified: 2020-10-27 16:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:13:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3872 0 None closed ovirt: remove template from the deploy 2021-01-14 10:03:52 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:13:45 UTC

Description Douglas Schilling Landgraf 2020-07-10 03:11:43 UTC
Description of problem:

The destroy cluster command do not remove the template created during the OCP deploy. It keep consuming resource from oVirt.

The issue is related to:
https://github.com/openshift/installer/blob/85092be98f2e913e3ea9b45622b73c3bc44d6e98/pkg/destroy/ovirt/destroyer.go#L120

The search uses: "name=%s" but the template is created using: TAGNAME-rhcos making the search cmd fail.

Comment 2 Roy Golan 2020-07-12 09:42:58 UTC
(In reply to Douglas Schilling Landgraf from comment #0)
> Description of problem:
> 
> The destroy cluster command do not remove the template created during the
> OCP deploy. It keep consuming resource from oVirt.
> 
> The issue is related to:
> https://github.com/openshift/installer/blob/
> 85092be98f2e913e3ea9b45622b73c3bc44d6e98/pkg/destroy/ovirt/destroyer.go#L120
> 
> The search uses: "name=%s" but the template is created using: TAGNAME-rhcos
> making the search cmd fail.

The template name ${cluster-id}-rhcos and the search is already a wildcard search. 

I think the real reason is a bug in pkg/asset/cluster/ovirt/ovirt.go which gzaidman sent a PR to not long ago
but I don't see it for some reason.

Comment 3 Roy Golan 2020-07-12 09:53:55 UTC
my bad, the UI probably adds wildcards? from the sdk wildcard are not added.

Comment 4 Guilherme Santos 2020-07-22 12:35:09 UTC
Verified on:
4.6.0-0.nightly-2020-07-22-074636

Steps:
1. # openshift-install create cluster --log-level=debug --dir=resources
2. once it's install, destroy it:
# openshift-install destroy cluster --dir=resources
3. check on engine UI is template is there (Compute -> Templates)

Results:
template created for ocp install deleted

Comment 7 errata-xmlrpc 2020-10-27 16:13:42 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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196


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