Bug 2025093

Summary: Installer does not honour diskformat specified in storage policy and defaults to zeroedthick
Product: OpenShift Container Platform Reporter: Hemant Kumar <hekumar>
Component: InstallerAssignee: Ayesha Kaleem <akaleem>
Installer sub component: openshift-installer QA Contact: jima
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: jcallen, mstaeble
Version: 4.10   
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:29:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hemant Kumar 2021-11-19 20:41:44 UTC
In OCP 4.10, it appears that even though my vSAN storage policy default is "thin", the installer is creating VMS with zeroedthick format and this takes lot of space.

Comment 3 jima 2021-11-30 05:02:26 UTC
Build a payload image with openshift/installer#5416, checked on registry.build01.ci.openshift.org/ci-ln-5bzh1st/release:latest.

Set platform.vsphere.diskType in install-config.yaml as below value and install ipi-on-vsphere cluster separately, installations with those configuration are successful, and disk type is as expected.
thin:

$ govc vm.info --json /SDDC-Datacenter/vm/jima1130thin-6xqlh/jima1130thin-6xqlh-rhcos | jq -r .VirtualMachines[].Layout.Disk[].DiskFile[]
[WorkloadDatastore] ca8ca561-ea5e-6ed6-8af0-0603566a4811/jima1130thin-6xqlh-rhcos.vmdk
$ govc datastore.disk.info -json ca8ca561-ea5e-6ed6-8af0-0603566a4811/jima1130thin-6xqlh-rhcos.vmdk | jq -r .[].DiskType
thin

thick:
$ govc vm.info --json /SDDC-Datacenter/vm/jima1130thick-z5ll5/jima1130thick-z5ll5-rhcos | jq -r .VirtualMachines[].Layout.Disk[].DiskFile[]
[WorkloadDatastore] 8b90a561-fa10-c120-4986-068ac9d0b439/jima1130thick-z5ll5-rhcos.vmdk
$ govc datastore.disk.info -json 8b90a561-fa10-c120-4986-068ac9d0b439/jima1130thick-z5ll5-rhcos.vmdk | jq -r .[].DiskType
preallocated

eagerZeroedThick:
$ govc vm.info --json /SDDC-Datacenter/vm/jima11302thick-q8g2c/jima11302thick-q8g2c-rhcos | jq -r .VirtualMachines[].Layout.Disk[].DiskFile[]
[WorkloadDatastore] 1894a561-3e6f-041b-b5fe-06aec2bed6c3/jima11302thick-q8g2c-rhcos.vmdk
$ govc datastore.disk.info -json 1894a561-3e6f-041b-b5fe-06aec2bed6c3/jima11302thick-q8g2c-rhcos.vmdk | jq -r .[].DiskType
eagerZeroedThick

Unset platform.vsphere.diskType in install-config.yaml, default disk type will be used, it's thin on VMC, rhcos template and vms of clusters are all set to thin.

Comment 6 jima 2021-12-13 03:43:39 UTC
Based on comments3, and also verified below scenarios against 4.10.0-0.nightly-2021-12-12-184227, move bug to VERIFIED.

1. set platform.vsphere.diskType as invalid type, such as "thintest", get expected error:
DEBUG vsphereprivate_import_ova.import: Creating... 
ERROR                                              
ERROR Error: Disk provisioning type "thintest" is not supported. 
ERROR                                              
ERROR   on ../../../../tmp/openshift-install-pre-bootstrap-1098948477/main.tf line 48, in resource "vsphereprivate_import_ova" "import": 
ERROR   48: resource "vsphereprivate_import_ova" "import" { 
ERROR                                              
ERROR                                              
FATAL failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to apply Terraform: failed to complete the change 

2. unset platform.vsphere.diskType in install-config.yaml, disk provisioning type is set as default storage policy on VMC.

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

RESOURCE: <string>
  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.

Comment 9 errata-xmlrpc 2022-03-10 16:29:53 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