Bug 1841118

Summary: vSphere survey panics with interrupt
Product: OpenShift Container Platform Reporter: Patrick Dillon <padillon>
Component: InstallerAssignee: Patrick Dillon <padillon>
Installer sub component: openshift-installer QA Contact: jima
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: jima
Version: 4.5   
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: errors were not being handled in the survey library used for the vsphere wizard Consequence: user interrupts would not halt the program--only proceed to the next survey prompt--causing an interrupt because variables were not assigned in the survey Fix: handle errors from the vsphere wizard Result: when a user interrupts the installer will gracefully exit
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:42:23 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 Patrick Dillon 2020-05-28 12:19:45 UTC
Description of problem:
If a user provides an interrupt (CTRL + C) when selecting vSphere platform options from the survey:

1. the survey does not stop
2. a panic occurs

How reproducible: always

Steps to Reproduce:
$ ./openshift-install create install-config --dir int
? SSH Public Key <none>
? Platform vsphere
? vCenter [? for help] (PRESS CTRL + C)
? Username [? for help] (PRESS CTRL + C) 
? Password [? for help] (PRESS CTRL + C)
INFO Connecting to vCenter                        
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x198f047]

goroutine 1 [running]:
github.com/openshift/installer/pkg/types/vsphere.CreateVSphereClients(0xd954cc0, 0xc00012f3e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
[truncated]

Expected results: 

The installer should handle the interrupts gracefully.

Additional info:
This is due to the fact that the vSphere survey does not have error handling.

Comment 3 jima 2020-06-01 07:21:18 UTC
The bug is verified with nightly build: 4.5.0-0.nightly-2020-05-31-230932.

”Ctrl+Z" can interrupt the installation and exit from survey with vsphere platform option.

# ./openshift-install create cluster --dir install_ipitest
? SSH Public Key /root/.ssh/openshift-qe.pub
? Platform vsphere
? vCenter vcsa2-qe.vmware.devcluster.openshift.com
? Username Administrator
? Password [? for help] ************
INFO Connecting to vCenter vcsa2-qe.vmware.devcluster.openshift.com 
INFO Defaulting to only available datacenter: dc1 
INFO Defaulting to only available cluster: devel  
? Default Datastore 10TB-GOLD
? Network Disconnected
? Virtual IP Address for API 1.1.1.1
? Virtual IP Address for Ingress 2.2.2.2
? Base Domain qe.devcluster.openshift.com
? Cluster Name test
? Pull Secret [? for help] 
FATAL failed to fetch Metadata: failed to fetch dependency of "Metadata": failed to fetch dependency of "Cluster ID": failed to fetch dependency of "Install Config": failed to generate asset "Pull Secret": interrupt

Comment 4 errata-xmlrpc 2020-07-13 17:42:23 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