Bug 1920554 - error when destroying a vSphere installation that failed early
Summary: error when destroying a vSphere installation that failed early
Keywords:
Status: CLOSED DUPLICATE of bug 1925282
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Patrick Dillon
QA Contact: jima
URL:
Whiteboard:
Depends On: 1920552
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-26 15:06 UTC by Patrick Dillon
Modified: 2021-02-15 20:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-15 20:16:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Patrick Dillon 2021-01-26 15:06:00 UTC
This bug was initially created as a copy of Bug #1920552

I am copying this bug because: 



This bug was initially created as a copy of Bug #1889779

I am copying this bug because: 



Thanks for opening a bug report!
Before hitting the button, please fill in as much of the template below as you can.
If you leave out information, it's harder to help you.
Be ready for follow-up questions, and please respond in a timely manner.
If we can't reproduce a bug we might close your issue.
If we're wrong, PLEASE feel free to reopen it and explain why.

Version:

$ openshift-install version
[jdiaz@minigoomba os-install-4.6-rc4]$ ./openshift-install version
./openshift-install 4.6.0-rc.4
built from commit ebdbda57fc18d3b73e69f0f2cc499ddfca7e6593
release image registry.svc.ci.openshift.org/ocp/release@sha256:2c22e1c56831935a24efb827d2df572855ccd555c980070f77c39729526037d5


Platform: vSphere

Please specify:
* IPI

What happened?
Cluster installation failed while creating/importing the RHCOS image.
Attempt to destroy any resources created up to the failure to allow a second installation attempt, and the destroy command gives an error.


What did you expect to happen?

The destroy command should gracefully notice that there is nothing to delete/destroy.

How to reproduce it (as minimally and precisely as possible)?

Set up an environment where the RHCOS import fails, or just force quit the installer during the RHCOS image import. Now that we have an incomplete installation, try to run the destroy.

$ ./openshift-install destroy cluster --dir vsphere --log-level=debug 

Anything else we need to know?

Here are the logs of the end of the failed install:

DEBUG vsphereprivate_import_ova.import: Still creating... [1m40s elapsed] 
DEBUG vsphereprivate_import_ova.import: Still creating... [1m50s elapsed] 
DEBUG vsphereprivate_import_ova.import: Still creating... [2m0s elapsed] 
DEBUG vsphereprivate_import_ova.import: Still creating... [2m10s elapsed] 
ERROR                                              
ERROR Error: failed to upload: Post "https://10.3.32.7/nfc/528eb5b2-eca4-9d4a-3126-6c97584cb1fa/disk-0.vmdk": dial tcp 10.3.32.7:443: connect: connection timed out 
ERROR                                              
ERROR   on ../../../../tmp/openshift-install-278843614/main.tf line 43, in resource "vsphereprivate_import_ova" "import": 
ERROR   43: resource "vsphereprivate_import_ova" "import" { 
ERROR                                              
ERROR                                              
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply Terraform: failed to complete the change 


And here is the error when trying to 'destroy cluster':

[jdiaz@minigoomba os-install-4.6-rc4]$ ./openshift-install destroy cluster --dir vmc --log-level=debug
DEBUG OpenShift Installer 4.6.0-rc.4               
DEBUG Built from commit ebdbda57fc18d3b73e69f0f2cc499ddfca7e6593 
DEBUG find attached objects on tag                 
DEBUG find VirtualMachine objects                  
FATAL Failed to destroy cluster: object references is empty 
[jdiaz@minigoomba os-install-4.6-rc4]$ echo $?
1

Comment 1 Patrick Dillon 2021-01-26 15:13:41 UTC
Just needs a cherry-pick but depends on https://github.com/openshift/installer/pull/4580

Comment 3 Matthew Staebler 2021-02-15 20:16:56 UTC

*** This bug has been marked as a duplicate of bug 1925282 ***


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