Bug 1822858 - [IPI on vsphere] rhcos template is not deleted from vsphere when running "destroy"
Summary: [IPI on vsphere] rhcos template is not deleted from vsphere when running "des...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.5.0
Assignee: Joseph Callen
QA Contact: jima
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-10 07:01 UTC by jima
Modified: 2023-09-14 05:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:26:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3443 0 None closed Bug 1822858: vsphere ipi: tag virtual machine created when importing ova 2021-01-20 07:33:35 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:27:13 UTC

Description jima 2020-04-10 07:01:06 UTC
Description of problem:
Running "openshift_install destroy cluster" and wait for cleaning up all entries on vsphere, after command is finished, rhcos template is not deleted.

# ./openshift-install destroy cluster --dir=./install/ --log-level=debug
DEBUG OpenShift Installer 4.5.0-0.nightly-2020-04-09-022455 
DEBUG Built from commit e11c2b8f54bb8aac1b6e8c2a005079059397e46a 
DEBUG find attached objects on tag                 
DEBUG find Folder objects                          
DEBUG find VirtualMachine objects                  
DEBUG delete VirtualMachines                       
DEBUG Powered off                                   VirtualMachine=jimaipi-2jvzp-bootstrap
INFO Destroyed                                     VirtualMachine=jimaipi-2jvzp-bootstrap
DEBUG Powered off                                   VirtualMachine=jimaipi-2jvzp-master-2
INFO Destroyed                                     VirtualMachine=jimaipi-2jvzp-master-2
DEBUG Powered off                                   VirtualMachine=jimaipi-2jvzp-master-0
INFO Destroyed                                     VirtualMachine=jimaipi-2jvzp-master-0
DEBUG Powered off                                   VirtualMachine=jimaipi-2jvzp-master-1
INFO Destroyed                                     VirtualMachine=jimaipi-2jvzp-master-1
DEBUG Powered off                                   VirtualMachine=jimaipi-2jvzp-worker-t52fm
INFO Destroyed                                     VirtualMachine=jimaipi-2jvzp-worker-t52fm
DEBUG find Folder objects                          
DEBUG delete Folder                                
INFO Destroyed                                     Folder=jimaipi-2jvzp
DEBUG Purging asset "Metadata" from disk           
DEBUG Purging asset "Terraform Variables" from disk 
DEBUG Purging asset "Kubeconfig Admin Client" from disk 
DEBUG Purging asset "Kubeadmin Password" from disk 
DEBUG Purging asset "Certificate (journal-gatewayd)" from disk 
DEBUG Purging asset "Cluster" from disk            
INFO Time elapsed: 29s           


Version:
4.5.0-0.nightly-2020-04-09-022455

How reproducible:
always

Steps to Reproduce:
1. Run command "./openshift-install destroy cluster --dir=./install/ --log-level=debug"
2. After command is completed, all entries except rhcos template are removed from vsphere.

Actual results:
rhcos template is not removed.

Expected results:
all entries created before should be removed from vsphere.

Additional info:

Comment 1 Joseph Callen 2020-04-13 13:30:44 UTC
Options:
1) Add a tag to the virtual machine that is created by terraform resource vsphereprivate_import_ova
2) Delete based on virtual machine name 

I like option 1. the best.

Comment 2 Joseph Callen 2020-04-13 14:38:51 UTC
Needs to be tested.
https://github.com/openshift/installer/pull/3443

Comment 5 jima 2020-04-14 01:47:43 UTC
Verified pass on nightly build: registry.svc.ci.openshift.org/ocp/release:4.5.0-0.nightly-2020-04-13-213244
- rhcos template has been moved under provided folder
- when destroy cluster, this template has also been removed

I have one question:
If you use option 1 adding a tag to vm, when destroying cluster, the vm will also be removed even if it has been renamed before?

From user story CORS-1337, it describes that customized name of VM template will not be removed.

Comment 6 Abhinav Dahiya 2020-04-14 02:36:39 UTC
assigning to Joe as he put forward the fix.

Comment 7 jima 2020-05-22 00:49:45 UTC
Since the issue describe in this bug has been fixed, move to "VERIFIED".

Comment 8 errata-xmlrpc 2020-07-13 17:26:59 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.

https://access.redhat.com/errata/RHBA-2020:2409

Comment 9 Red Hat Bugzilla 2023-09-14 05:55:22 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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