Bug 1770006

Summary: Installer leaves behind orphaned Swift Containers
Product: OpenShift Container Platform Reporter: egarcia
Component: InstallerAssignee: egarcia
Installer sub component: OpenShift on OpenStack QA Contact: David Sanz <dsanzmor>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: high CC: eduen
Version: 4.3.0Flags: egarcia: needinfo-
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-23 11:11:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description egarcia 2019-11-07 21:55:47 UTC
Description of problem: if the installer stops before terraform is run, it leaves a swift container it cannot clean up

Version-Release number of the following components: Master

How reproducible: Always

Steps to Reproduce:
1. export OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE=https://www.redhat.com/cms/managed-files/Logo-redhat-color-375.png?sha256=invalid
2. run installer
3. destroy installer

Actual results:
Swift container is left over.

Expected results:
All components created by the installer are deleted

Comment 3 David Sanz 2019-11-11 10:20:04 UTC
Verified on 4.3.0-0.nightly-2019-11-11-081655


[morenod@morenod-laptop osp-terraform]$ export OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE=https://www.redhat.com/cms/managed-files/Logo-redhat-color-375.png?sha256=invalid
[morenod@morenod-laptop osp-terraform]$ ./openshift-install create cluster
WARNING Found override for OS Image. Please be warned, this is not advised 
INFO Obtaining RHCOS image file from 'https://www.redhat.com/cms/managed-files/Logo-redhat-color-375.png?sha256=invalid' 
ERROR File sha256 checksum is invalid.             
FATAL failed to fetch Terraform Variables: failed to generate asset "Terraform Variables": failed to get openstack Terraform variables: Checksum mismatch for /home/morenod/.cache/openshift-installer/image_cache/0ca280b231561fdea212d100ccd2594c; expected=invalid found=9bb8daa3ea2e01ef988ef3c53ef66a7465d9089c0419c065ff19a7e699402826 
[morenod@morenod-laptop osp-terraform]$ cat terraform.tfvars.json | jq . | grep cluster_id
  "cluster_id": "morenod-ocp-p5tzv",
[morenod@morenod-laptop osp-terraform]$ openstack container list | grep morenod-ocp-p5tzv | wc -l
0
[morenod@morenod-laptop osp-terraform]$ ./openshift-install destroy cluster
FATAL Failed while preparing to destroy cluster: open metadata.json: no such file or directory

Comment 4 David Sanz 2019-11-11 11:28:26 UTC
Verified on 4.3.0-0.nightly-2019-11-11-081655


[morenod@morenod-laptop osp-terraform]$ export OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE=https://www.redhat.com/cms/managed-files/Logo-redhat-color-375.png?sha256=invalid
[morenod@morenod-laptop osp-terraform]$ ./openshift-install create cluster
WARNING Found override for OS Image. Please be warned, this is not advised 
INFO Obtaining RHCOS image file from 'https://www.redhat.com/cms/managed-files/Logo-redhat-color-375.png?sha256=invalid' 
ERROR File sha256 checksum is invalid.             
FATAL failed to fetch Terraform Variables: failed to generate asset "Terraform Variables": failed to get openstack Terraform variables: Checksum mismatch for /home/morenod/.cache/openshift-installer/image_cache/0ca280b231561fdea212d100ccd2594c; expected=invalid found=9bb8daa3ea2e01ef988ef3c53ef66a7465d9089c0419c065ff19a7e699402826 
[morenod@morenod-laptop osp-terraform]$ cat terraform.tfvars.json | jq . | grep cluster_id
  "cluster_id": "morenod-ocp-p5tzv",
[morenod@morenod-laptop osp-terraform]$ openstack container list | grep morenod-ocp-p5tzv | wc -l
0
[morenod@morenod-laptop osp-terraform]$ ./openshift-install destroy cluster
FATAL Failed while preparing to destroy cluster: open metadata.json: no such file or directory

Comment 6 errata-xmlrpc 2020-01-23 11:11:43 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:0062