Bug 2096605 - [vsphere] no validation checking for diskType
Summary: [vsphere] no validation checking for diskType
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.11.0
Assignee: Rafael Fonseca
QA Contact: jima
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-14 08:04 UTC by jima
Modified: 2022-08-10 11:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:17:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 6019 0 None open Bug 2096605: vsphere: validate diskType if supplied 2022-06-17 08:01:36 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:18:04 UTC

Description jima 2022-06-14 08:04:14 UTC
Version: 4.11.0-0.nightly-2022-06-06-201913

Platform: vSphere IPI

What happened?
1. If user inputs an invalid value for platform.vsphere.diskType in install-config.yaml file, there is no validation checking for diskType and doesn't exit with error, but continues the installation, which is not the same behavior as in 4.10.

After all vms are provisioned, I checked that the disk provision type is thick.

2. If user doesn't set platform.vsphere.diskType in install-config.yaml file, the default disk provision type is thick, but not the vSphere default storage policy. On VMC, the default policy is thin, so maybe the description of diskType should also need to be updated.

$ ./openshift-install explain installconfig.platform.vsphere.diskType
KIND:     InstallConfig
VERSION:  v1

RESOURCE: <string>
  Valid Values: "","thin","thick","eagerZeroedThick"
  DiskType is the name of the disk provisioning type, valid values are thin, thick, and eagerZeroedThick. When not specified, it will be set according to the default storage policy of vsphere.


What did you expect to happen?
validation for diskType

How to reproduce it (as minimally and precisely as possible)?
set diskType to invalid value in install-config.yaml and install the cluster

Comment 1 Rafael Fonseca 2022-06-16 19:45:19 UTC
https://github.com/openshift/installer/pull/6019

Comment 4 jima 2022-06-22 01:39:53 UTC
Verified on 4.11.0-0.nightly-2022-06-21-040754

Set diskType to invalid value in install-config.yaml:
diskType: test:
$ ./openshift-install create manifests --dir ipi
ERROR failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: invalid "install-config.yaml" file: platform.vsphere.diskType: Invalid value: "test": diskType must be one of [eagerZeroedThick thick thin] 

diskType: Thick:
$ ./openshift-install create manifests --dir ipi3
ERROR failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: invalid "install-config.yaml" file: platform.vsphere.diskType: Invalid value: "Thick": diskType must be one of [eagerZeroedThick thick thin] 

Set diskType to valid value in install-config.yaml:
diskType: eagerZeroedThick:
$ ./openshift-install create manifests --dir ipi2
INFO Consuming Install Config from target directory 
INFO Manifests created in: ipi2/manifests and ipi2/openshift 
$ yq r ipi2/manifests/cluster-config.yaml 'data.install-config' | yq r - platform.vsphere.diskType
eagerZeroedThick

If set diskType as "" in install-config.yaml, the result is the same as not setting diskType. 

The description update will be tracked in BZ https://bugzilla.redhat.com/show_bug.cgi?id=2098072, so move this bug to VERIFIED.

Comment 6 errata-xmlrpc 2022-08-10 11:17:47 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


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