Description of problem: On oVirt installer we have an incorrect template removal condition. We need to remove the template only when the env variable OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE is not found and currently is is the other way around. The expected flows: OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE is present --> Template will not be removed and that is what we want because that is a template the installation didn't create OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE is not present --> Template will be removed and that is what we want because that is a template the installation created
Verified on: 4.6.0-0.nightly-2020-07-22-074636 Steps: 1. with override of image: 1.1. have an rhcos template on RHV and export it as env var: # export OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE=rchos-template 1.2. # openshift-install create cluster --log-level=debug --dir=resources 1.3. # openshift-install destroy cluster --log-level=debug --dir=resources 2. without override of image: 2.1. # openshift-install create cluster --log-level=debug --dir=resources 2.2. # openshift-install destroy cluster --log-level=debug --dir=resources Results: on scenario 1. the used template didn't get deleted on destroy on scenario 2. the created template did get deleted on destroy
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