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:
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.
Needs to be tested. https://github.com/openshift/installer/pull/3443
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.
assigning to Joe as he put forward the fix.
Since the issue describe in this bug has been fixed, move to "VERIFIED".
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
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days