Bug 1814039 - Installer doesn't validates api, dns or wildcard IP information while generating install-config file
Summary: Installer doesn't validates api, dns or wildcard IP information while generat...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.4
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
: 4.5.0
Assignee: Roy Golan
QA Contact: Jan Zmeskal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-16 20:22 UTC by Vishal Bhatia
Modified: 2020-08-04 18:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-04 18:05:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Installer logs (40.20 KB, text/plain)
2020-03-16 20:22 UTC, Vishal Bhatia
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-08-04 18:05:37 UTC

Description Vishal Bhatia 2020-03-16 20:22:14 UTC
Created attachment 1670653 [details]
Installer logs

Description of problem:
IPI installer requires api-server, dns and wildcard domain IPs to be provided. However, its not validating the IP format. Having an extra space in the end causes 

Version-Release number of the following components:
4.4.0-0.nightly-2020-03-15-192859 for linux

Steps to Reproduce:
1. Have an extra space in the end while providing IP address for api-server with ./openshift-install create install-config 
2. Check the created install-config.yaml
3. IP address is listed as string in yaml with quotes and extra space
4. Running installer with install-cluster fails with error 
"failed to fetch dependency of "Terraform Variables": failed to fetch dependency of "Bootstrap Ignition Config": failed to fetch dependency of "Common Manifests": failed to generate asset "Certificate (mcs)": failed to generate signed cert/key pair: error parsing x509 certificate request: x509: cannot parse IP address of length 0"

Actual results:
Incorrect yaml entry for IP address and failed install with above error message

Expected results:
Installer gives an error if invalid IP is entered. 

Additional info:
See attachment

Comment 1 Roy Golan 2020-05-26 09:26:01 UTC
part of latest changes to 4.5 this validation will yeild

[ovirt@vm-10-51 ocp]$ ./openshift-install create ignition-configs --dir test-2
? SSH Public Key /home/ovirt/.ssh/id_rsa.pub
? Platform ovirt
? oVirt cluster green
? oVirt storage domain tlv-netapp
? oVirt network net1
? Internal API virtual IP 10.2.3.2 
? Internal DNS virtual IP 1.1.2.3 
? Ingress virtual IP 4.4.4.4 
? Base Domain foo.com
? Cluster Name fol
? Pull Secret [? for help] 
FATAL failed to fetch Kubeconfig Admin Client: failed to fetch dependency of "Kubeconfig Admin Client": failed to generate asset "Install Config": invalid install config: [platform.ovirt.api_vip: Invalid value: "10.2.3.2 ": "10.2.3.2 " is not a valid IP, platform.ovirt.dns_vip: Invalid value: "1.1.2.3 ": "1.1.2.3 " is not a valid IP, platform.ovirt.ingress_vip: Invalid value: "4.4.4.4 ": "4.4.4.4 " is not a valid IP]

Comment 2 Jan Zmeskal 2020-05-26 09:58:28 UTC
Verified with openshift-install-linux-4.5.0-0.nightly-2020-05-26-051016

Comment 5 errata-xmlrpc 2020-08-04 18:05:34 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 (OpenShift Container Platform 4.5 image release 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


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