Bug 1908468 - [Azure][4.7] Installer can't properly parse instance type with non integer memory size
Summary: [Azure][4.7] Installer can't properly parse instance type with non integer me...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Jeremiah Stuever
QA Contact: Etienne Simard
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-16 19:15 UTC by Etienne Simard
Modified: 2021-02-24 15:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:45:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4530 0 None closed Bug 1908468: azure/validation: some memory values are float and not int 2021-01-18 17:53:36 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:45:53 UTC

Description Etienne Simard 2020-12-16 19:15:50 UTC
Version:

./openshift-install create cluster --dir ./invalid22/ --log-level debug
DEBUG OpenShift Installer 4.7.0-0.nightly-2020-12-14-080124 
DEBUG Built from commit ec982ecf5bd847add0f3af82b04f32251972701c 


Platform:

Azure

Please specify:

IPI

What happened?

Tried to test a cluster creation with Standard_D1_v2 as a machine type (3.5G of RAM)

~~~
FATAL failed to fetch Metadata: failed to load asset "Install Config": [compute[0].platform.azure.type: Invalid value: "Standard_D1_v2": instance type does not meet minimum resource requirements of 2 vCPUs, compute[0].platform.azure: Internal error: strconv.ParseInt: parsing "3.5": invalid syntax] 
~~~



What did you expect to happen?

We should be able to parse non int values as they can exist on Azure.

I would expect to see "compute[0].platform.azure: Invalid value: "Standard_D1_v2": instance type does not meet minimum resource requirements of 8 GB Memory" instead of "compute[0].platform.azure: Internal error: strconv.ParseInt: parsing "3.5": invalid syntax]"

How to reproduce?

Generate an install-config.yaml file for Azure and use Standard_D1_v2 as a machine type, then run the installer.

Comment 1 Jeremiah Stuever 2020-12-16 19:22:15 UTC
This is an side-effect of having reused code from other platforms where the assumption that these values are integers is valid. However, that is not the case with Azure where some memory values have decimal points. Should be easy enough to fix.

https://github.com/openshift/installer/blob/91402a22c47edd67c4b9802c4f2e47bfce3b3f39/pkg/asset/installconfig/azure/validation.go#L72

Comment 3 Etienne Simard 2021-01-18 18:43:58 UTC
Verified with: 

./openshift-install 4.7.0-fc.3
built from commit 0c58270fadf5683ac6e0198b1cced305badd9e6b
release image registry.ci.openshift.org/ocp/release@sha256:ce05fd235f0e59ea0114c73ef25abf838b9c3af103d9cb66aa7ba10eeacd8537

~~~
FATAL failed to fetch Metadata: failed to load asset "Install Config": [compute[0].platform.azure.type: Invalid value: "Standard_D1_v2": instance type does not meet minimum resource requirements of 2 vCPUs, compute[0].platform.azure.type: Invalid value: "Standard_D1_v2": instance type does not meet minimum resource requirements of 8 GB Memory] 
~~~

Comment 6 errata-xmlrpc 2021-02-24 15:45:31 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.7.0 security, bug fix, and enhancement 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-2020:5633


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