Bug 1838631 - GCP: Set validations for disk size
Summary: GCP: Set validations for disk size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Aditya Narayanaswamy
QA Contact: Yang Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-21 13:20 UTC by Aditya Narayanaswamy
Modified: 2020-07-13 17:41 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
GCP returns a different error message when the value for diskSizeGB is set to less than 16GB (as the image size is 16GB) and more than 65537GB (Maximum disk size in GCp is 65536GB) and it takes time for these errors to be detected as the calls go to the GCP console before they are identified. Placed a check in the diskSizeGB field validation to detect these invalid values and report the appropriate error message quickly.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:40:55 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3639 0 None closed Bug 1838631: Set validations for GCP disk sizes. 2021-01-16 15:22:43 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:41:14 UTC

Description Aditya Narayanaswamy 2020-05-21 13:20:35 UTC
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.

Comment 3 Yang Yang 2020-05-27 09:20:13 UTC
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]"

Comment 4 Aditya Narayanaswamy 2020-05-27 13:10:11 UTC
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.

Comment 5 errata-xmlrpc 2020-07-13 17:40:55 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, 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


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