Bug 1852720 - vSphere IPI - cluster destroy leaves installer tags
Summary: vSphere IPI - cluster destroy leaves installer tags
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.z
Assignee: Abhinav Dahiya
QA Contact: jima
URL:
Whiteboard:
Depends On: 1846125
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-01 07:10 UTC by jima
Modified: 2023-10-06 20:56 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The installer attempted to remove tags before all the resources with those tags were removed. Consequence: It failed to remove the tags. Fix: The installer now removes tags after resources were deleted. Result: Installer tags are removed.
Clone Of: 1846125
Environment:
Last Closed: 2020-09-08 10:54:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3981 0 None closed [release-4.5] Bug 1852720: deleting vsphere cluster tag after deleting the attached resources 2021-02-18 13:50:25 UTC
Red Hat Knowledge Base (Solution) 5225131 0 None None None 2020-08-04 20:04:22 UTC
Red Hat Product Errata RHBA-2020:3510 0 None None None 2020-09-08 10:54:25 UTC

Description jima 2020-07-01 07:10:38 UTC
+++ This bug was initially created as a clone of Bug #1846125 +++


Description of problem:

When openshift-install destroy cluster is run the VMs and folder are deleted but any tags by the installer are left in place.

How reproducible:

Steps to Reproduce:
1. Run openshift-install create cluster
2. Run openshift-install destroy cluster
3. All tags from previous installations are still present.

https://github.com/openshift/installer/blob/master/pkg/destroy/vsphere/vsphere.go#L157-L193

Expected results:
Tags are deleted with other objects.

--- Additional comment from Brenton Leanhardt on 2020-06-18 18:09:09 UTC ---

During triage we were not able to prioritize this bug.  Deferring...

Comment 1 jima 2020-07-01 07:34:08 UTC
The impact for this issue is that when destroying the cluster, the tags on vsphere server is still there, since this is not release blocked issue, so set target release as 4.5.z.

Comment 2 Abhinav Dahiya 2020-07-10 16:35:05 UTC
Still blocked on having the bug fixed in 4.6

Comment 5 jima 2020-08-21 05:52:35 UTC
Verified on nightly build 4.5.0-0.nightly-2020-08-20-235458 and passed.
Checked on vcenter client, tags are deleted after running openshift_install destroy cluster.

time="2020-08-21T05:49:26Z" level=debug msg="OpenShift Installer 4.5.0-0.nightly-2020-08-20-235458"
time="2020-08-21T05:49:26Z" level=debug msg="Built from commit d104265b789bf49148597f7247e278a18d6919c3"
time="2020-08-21T05:49:26Z" level=debug msg="find attached objects on tag"
time="2020-08-21T05:49:27Z" level=debug msg="find VirtualMachine objects"
time="2020-08-21T05:49:27Z" level=debug msg="delete VirtualMachines"
time="2020-08-21T05:49:27Z" level=info msg=Destroyed VirtualMachine=jimavmc45-wr962-rhcos
time="2020-08-21T05:49:28Z" level=debug msg="Powered off" VirtualMachine=jimavmc45-wr962-master-1
time="2020-08-21T05:49:28Z" level=info msg=Destroyed VirtualMachine=jimavmc45-wr962-master-1
time="2020-08-21T05:49:31Z" level=debug msg="Powered off" VirtualMachine=jimavmc45-wr962-master-0
time="2020-08-21T05:49:31Z" level=info msg=Destroyed VirtualMachine=jimavmc45-wr962-master-0
time="2020-08-21T05:49:32Z" level=debug msg="Powered off" VirtualMachine=jimavmc45-wr962-master-2
time="2020-08-21T05:49:32Z" level=info msg=Destroyed VirtualMachine=jimavmc45-wr962-master-2
time="2020-08-21T05:49:33Z" level=debug msg="Powered off" VirtualMachine=jimavmc45-wr962-worker-sr996
time="2020-08-21T05:49:33Z" level=info msg=Destroyed VirtualMachine=jimavmc45-wr962-worker-sr996
time="2020-08-21T05:49:34Z" level=debug msg="Powered off" VirtualMachine=jimavmc45-wr962-worker-qgrv9
time="2020-08-21T05:49:35Z" level=info msg=Destroyed VirtualMachine=jimavmc45-wr962-worker-qgrv9
time="2020-08-21T05:49:35Z" level=debug msg="Powered off" VirtualMachine=jimavmc45-wr962-worker-6sffl
time="2020-08-21T05:49:36Z" level=info msg=Destroyed VirtualMachine=jimavmc45-wr962-worker-6sffl
time="2020-08-21T05:49:36Z" level=debug msg="find Folder objects"
time="2020-08-21T05:49:36Z" level=debug msg="delete Folder"
time="2020-08-21T05:49:36Z" level=info msg=Destroyed Folder=jimavmc45-wr962
time="2020-08-21T05:49:36Z" level=debug msg="delete tag"
time="2020-08-21T05:49:36Z" level=debug msg="Purging asset \"Metadata\" from disk"
time="2020-08-21T05:49:36Z" level=debug msg="Purging asset \"Terraform Variables\" from disk"
time="2020-08-21T05:49:36Z" level=debug msg="Purging asset \"Kubeconfig Admin Client\" from disk"
time="2020-08-21T05:49:36Z" level=debug msg="Purging asset \"Kubeadmin Password\" from disk"
time="2020-08-21T05:49:36Z" level=debug msg="Purging asset \"Certificate (journal-gatewayd)\" from disk"
time="2020-08-21T05:49:36Z" level=debug msg="Purging asset \"Cluster\" from disk"
time="2020-08-21T05:49:36Z" level=info msg="Time elapsed: 11s"

Comment 8 errata-xmlrpc 2020-09-08 10:54:03 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.5.8 bug fix 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/RHBA-2020:3510

Comment 9 Abhinav Dahiya 2020-09-28 16:29:57 UTC
*** Bug 1882844 has been marked as a duplicate of this bug. ***


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