Hide Forgot
This bug was initially created as a copy of Bug #2096605 I am copying this bug because: the parent bug solved the validation aspect of diskType but now the description of diskType in https://github.com/openshift/installer/blob/master/data/data/install.openshift.io_installconfigs.yaml#L2914-L2923 needs to be updated. 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
Setting severity to high since this is a regression in the way the default disk type is chosen.
Setting as not a blocker since it only affects the cases when diskType is not specified and the default storage policy is not "thick".
Verified on 4.12.0-0.nightly-2022-08-24-053339, and passed, move bug to VERIFIED. 1. invalid diskType in install-config.yaml: platform: vsphere: diskType: "typea" $ ./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: "typea": diskType must be one of [eagerZeroedThick thick thin] $ ./openshift-install create cluster --dir ipi --log-level debug DEBUG OpenShift Installer 4.12.0-0.nightly-2022-08-24-053339 DEBUG Built from commit 730ea9bac6eef7a2124e1132fb5a2717f562bd11 ... After ova template is imported, disk type is Thin Provision, which is the default storage policy of datastore on vmc, this is same behavior as what describes in installation doc. 2. Empty diskType in install-config.yaml: platform: vsphere: diskType: "" $ ./openshift-install create manifests --dir ipi INFO Consuming Install Config from target directory INFO Manifests created in: ipi/manifests and ipi/openshift $ cat manifests/cluster-config.yaml | grep diskType $ 3. thick diskType in install-config.yaml: platform: vsphere: diskType: "thick" $ ./openshift-install create manifests --dir ipi-thick/ INFO Consuming Install Config from target directory INFO Manifests created in: ipi-thick/manifests and ipi-thick/openshift $ cat manifests/cluster-config.yaml | grep diskType diskType: thick
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.12.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:7399