Bug 2098072 - [vsphere] update install-config description for diskType
Summary: [vsphere] update install-config description for diskType
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.11
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.12.0
Assignee: Rafael Fonseca
QA Contact: jima
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-17 08:07 UTC by Rafael Fonseca
Modified: 2023-01-17 19:50 UTC (History)
0 users

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-17 19:50:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 6233 0 None open Bug 2098072: vsphere: fix default disk type when not speficied 2022-08-16 19:43:06 UTC
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:50:34 UTC

Description Rafael Fonseca 2022-06-17 08:07:40 UTC
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

Comment 4 Rafael Fonseca 2022-08-17 13:57:55 UTC
Setting severity to high since this is a regression in the way the default disk type is chosen.

Comment 5 Rafael Fonseca 2022-08-22 21:22:38 UTC
Setting as not a blocker since it only affects the cases when diskType is not specified and the default storage policy is not "thick".

Comment 7 jima 2022-08-26 01:54:19 UTC
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

Comment 10 errata-xmlrpc 2023-01-17 19:50:02 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.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


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