GCP disk sizes must at least be the size of the image file of 16GB. Also, GCP restricts the max size to 65536GB and hence the validations must be set to produce the proper error messages.
Hi Aditya, The disk size of 0 is not validated. The specified disk size of 0 is treated as default disk size of 128. Is it by design? Except above issue, it looks good by verifying with 4.5.0-0.nightly-2020-05-27-075521 1. Set disksize to 15GB and install cluster, installer reports errors like: + ./openshift-install create manifests --dir '/home/jenkins/workspace/Launch Environment Flexy/workdir/install-dir' level=fatal msg="failed to fetch Master Machines: failed to load asset \"Install Config\": invalid \"install-config.yaml\" file: [controlPlane.platform.gcp.diskSizeGB: Invalid value: 15: must be at least 16GB in size, compute[0].platform.gcp.diskSizeGB: Invalid value: 15: must be at least 16GB in size]" 2. Set disksize to 65537 and install cluster, installer reports errors like: + ./openshift-install create manifests --dir '/home/jenkins/workspace/Launch Environment Flexy/workdir/install-dir' level=fatal msg="failed to fetch Master Machines: failed to load asset \"Install Config\": invalid \"install-config.yaml\" file: [controlPlane.platform.gcp.diskSizeGB: Invalid value: 65537: exceeding maximum GCP disk size limit, must be below 65536, compute[0].platform.gcp.diskSizeGB: Invalid value: 65537: exceeding maximum GCP disk size limit, must be below 65536]" 3. Set disksize to -1 and install cluster, installer reports errors like: + ./openshift-install create manifests --dir '/home/jenkins/workspace/Launch Environment Flexy/workdir/install-dir' level=fatal msg="failed to fetch Master Machines: failed to load asset \"Install Config\": invalid \"install-config.yaml\" file: [controlPlane.platform.gcp.diskSizeGB: Invalid value: -1: must be at least 16GB in size, compute[0].platform.gcp.diskSizeGB: Invalid value: -1: must be at least 16GB in size]"
If the user does not set a value to that field then it's value is 0 by default which would be set to the default disk size the installer has for GCP. So, the system takes 0 as not set. Golang sets the value to 0 if there is no value set so I don't think this case can be checked.
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, 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/RHBA-2020:2409