Bug 1956776 - [vSphere] Installer should do pre-check to ensure user-provided network name is valid
Summary: [vSphere] Installer should do pre-check to ensure user-provided network name ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.7
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: 4.10.0
Assignee: Aditya Narayanaswamy
QA Contact: jima
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-04 11:53 UTC by Simon Krenger
Modified: 2022-03-10 16:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If an incorrect network is specified in the vsphere install-config, there is an error message from terraform after a while. Adding a check during the creation of manifests to notify the user if the network is invalid.
Clone Of:
Environment:
Last Closed: 2022-03-10 16:03:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4906 0 None open Bug 1956776: Check if network is valid in install-config 2021-05-06 02:55:15 UTC
Github openshift installer pull 5317 0 None open Bug 1956776: Fix network validation 2021-10-21 14:29:50 UTC
Github openshift installer pull 5340 0 None open Bug 1956776: Fix network validation for UPI 2021-10-28 15:08:27 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:04:05 UTC

Comment 1 Russell Teague 2021-07-12 17:55:50 UTC
Needs further review to determine how to move forward.

Comment 6 jima 2021-10-21 00:59:38 UTC
Verified failed on 4.10.0-0.nightly-2021-10-19-150011 which include the fix.

1. Prepare install-config.yaml file and set wrong network name
2. Run openshift-installer create cluster
3. Expected error in PR is not present instead openshift-installer exit when running terraform vsphereerror is reported in terraform vsphere provider as below:

time="2021-10-20T10:16:49Z" level=error msg="Error: error fetching network: network 'VM Network 1' not found"

Checked with Aditya, issue will be fixed in new PR #5317, so move bug back to ASSIGNED to get new PR merged.

Comment 9 jima 2021-10-28 05:52:52 UTC
Verified failed on registry.ci.openshift.org/ocp/release:4.10.0-0.nightly-2021-10-27-230233.

It works on IPI, but block UPI installation with below error due to not set network option in install-config.yaml, since network option is not required on UPI per official doc[1] and upstream doc [2].

10-28 13:31:11.013  [INFO] Generating manifests files.....
10-28 13:31:12.910  level=fatal msg=failed to fetch Master Machines: failed to load asset "Install Config": platform.vsphere.network: Invalid value: "": unable to find network provided

install-config.yaml file for UPI is:

install-config.yaml:
  ---
  apiVersion: v1
  controlPlane:
    architecture: amd64
    hyperthreading: Enabled
    name: master
    replicas: 3
  compute:
  - architecture: amd64
    hyperthreading: Enabled
    name: worker
    replicas: 0
  metadata:
    name: miyadav-vs28
  platform:
    vsphere:
      vCenter: vcenter.sddc-xx-xx-xx-xx.vmwarevmc.com
      username: xxxx@ldap.vmc.ci.openshift.org
      password: HIDDEN
      datacenter: SDDC-Datacenter
      defaultDatastore: WorkloadDatastore
  pullSecret: HIDDEN
  networking:
    clusterNetwork:
    - cidr: 10.128.0.0/14
      hostPrefix: 23
    serviceNetwork:
    - 172.30.0.0/16
    networkType: OpenShiftSDN
  publish: External
  baseDomain: qe.devcluster.openshift.com
  sshKey: xxxxx

[1] https://docs.openshift.com/container-platform/4.9/installing/installing_vsphere/installing-vsphere.html
[2] https://github.com/openshift/installer/blob/master/upi/vsphere/README.md

Comment 13 jima 2021-11-15 07:47:35 UTC
Verified on 4.10.0-0.nightly-2021-11-14-184249 and passed

1. UPI installation is finished without error
2. set invalid network in install-config.yaml file, and run "./openshift-install create manifests --dir ipi", got the expected error.
$ ./openshift-install create manifests --dir ipi
FATAL failed to fetch Master Machines: failed to load asset "Install Config": platform.vsphere.network: Invalid value: "qe-segment1": unable to find network provided

Comment 18 errata-xmlrpc 2022-03-10 16:03:38 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 (Moderate: OpenShift Container Platform 4.10.3 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:0056


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