Bug 1805599 - Template is left in RHV engine after OCP cluster has been destroyed
Summary: Template is left in RHV engine after OCP cluster has been destroyed
Keywords:
Status: CLOSED DUPLICATE of bug 1842871
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.0
Assignee: Douglas Schilling Landgraf
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-21 06:00 UTC by Jan Zmeskal
Modified: 2020-06-05 14:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-05 14:48:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Zmeskal 2020-02-21 06:00:38 UTC
Description of problem:
After running openshift-install destroy cluster against a deployment in RHV engine, the RHCOS template (as well as temporary VM used to create it) are left in the engine, while other OCP nodes (masters and workers) are removed.

Version-Release number of the following components:
./openshift-install v4.4.0
built from commit 4ed0d38bc8431494eb9d00b01e7e810e09c9e323
release image quay.io/openshift-release-dev/ocp-release-nightly@sha256:d5bca1eb21d3f4d9f1757a52f651e10a030f7a61e347665ac596e510197e3250
rhvm-4.3.9.0-0.1.el7.noarch

How reproducible:
100 %

Steps to Reproduce:
1. Deploy OCP cluster on top of RHV
2. Destroy the cluster using openshift-install
3.

Actual results:
./openshift-install destroy cluster --dir=test-cluster
INFO searching VMs by tag=six-h8nhk               
INFO Found %!s(int=5) VMs                         
INFO Stopping VM six-h8nhk-worker-0-prvbt : errors: %s%!(EXTRA <nil>) 
INFO Stopping VM six-h8nhk-master-0 : errors: %s%!(EXTRA <nil>) 
INFO Stopping VM six-h8nhk-master-1 : errors: %s%!(EXTRA <nil>) 
INFO Stopping VM six-h8nhk-master-2 : errors: %s%!(EXTRA <nil>) 
INFO Stopping VM six-h8nhk-worker-0-8wf56 : errors: %s%!(EXTRA <nil>) 
INFO Removing VM six-h8nhk-worker-0-8wf56 : errors: %s%!(EXTRA <nil>) 
INFO Removing VM six-h8nhk-master-0 : errors: %s%!(EXTRA <nil>) 
INFO Removing VM six-h8nhk-worker-0-prvbt : errors: %s%!(EXTRA <nil>) 
INFO Removing VM six-h8nhk-master-1 : errors: %s%!(EXTRA <nil>) 
INFO Removing VM six-h8nhk-master-2 : errors: %s%!(EXTRA <nil>) 
ERROR Removing VMs - error: %!s(<nil>)             
INFO Removing tag six-h8nhk : errors: %s%!(EXTRA <nil>) 
ERROR Removing Tag - error: %!s(<nil>)             
ERROR Removing Template - error: %!s(<nil>

Expected results:
Template is deleted. If the temporary VM is still present (which in my opinion should, see https://bugzilla.redhat.com/show_bug.cgi?id=1794432), it is deleted as well.

Comment 2 Roy Golan 2020-02-25 10:31:01 UTC
If that's a template which is overrided, meaning that you exported OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE then
this is expected. The thinking behind it is that this resource may not owned by a single OCP cluster
and was most probably tweaked/customized.

Scott/Abhinav is this a deviation from 'Cluster Destroy' design? (reminder "template" here means ovirt template or generally a flavour)

Comment 3 Jan Zmeskal 2020-02-25 10:49:09 UTC
Roy,

it surely makes sense not to remove template when it's being overridden. However, this happens no matter if you override the template or not.

Comment 6 Douglas Schilling Landgraf 2020-06-05 14:48:05 UTC

*** This bug has been marked as a duplicate of bug 1842871 ***


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