Bug 2098243

Summary: Add error check to Platform create for Power VS
Product: OpenShift Container Platform Reporter: cklokman
Component: InstallerAssignee: Sudha Ponnaganti <sponnaga>
Installer sub component: openshift-installer QA Contact: Julie <mjulie>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: eparis, gpei, mhamzy
Version: 4.11   
Target Milestone: ---   
Target Release: 4.11.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: 2022-08-10 11:18:42 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 cklokman 2022-06-17 17:05:08 UTC
Description of problem:
If platform errors out, the survey continues without a platform and will error out later in the process.

How reproducible:
Very

Steps to Reproduce:
1. Use incorrect credentials and error out of platform
2. Continue filling out survey until base domain prompts
3. Enter anything and ipi will error out will a null platform

Actual results:
? SSH Public Key /root/.ssh/id_rsa.pub
? Platform powervs
? IBM Cloud User ID mjulie.com
? Region osa
? Zone osa21
? Base Domain 

FATAL failed to fetch Install Config: failed to generate asset "Install Config": 
invalid install config: platform: Invalid value: "": must specify one of the platforms 
(alibabacloud, aws, azure, baremetal, gcp, ibmcloud, none, nutanix, openstack, ovirt, powervs, vsphere)

Expected results:
Proper error message when platform errors out.

Additional info:
Here's the fix https://github.com/openshift/installer/pull/5958/files

Comment 4 Julie 2022-07-21 12:06:07 UTC
Verified with OpenShift Installer 4.11.0-rc.4 build.
Tried a few scenarios. Not able to reproduce the invalid error message that was reported in the problem description.


On trying with incorrect credentials, it is showing a proper error message.

# ./openshift-install  create install-config --dir  err-check
? SSH Public Key /root/.ssh/id_rsa.pub
? Platform powervs
? IBM Cloud User ID mjulie.com
? IBM Cloud API Key [? for help] ****
? Region lon
? Zone lon06
FATAL failed to fetch Install Config: failed to fetch dependency of "Install Config": failed to fetch dependency of "Base Domain": failed to generate asset "Platform": Request failed with status code: 400, bad_request: Parameter role is required, specify either space_guid or org_guid

Comment 5 errata-xmlrpc 2022-08-10 11:18:42 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069