Bug 2009699 - Failure to validate flavor RAM
Summary: Failure to validate flavor RAM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.10.0
Assignee: Martin André
QA Contact: Itay Matza
URL:
Whiteboard:
Depends On:
Blocks: 2009787
TreeView+ depends on / blocked
 
Reported: 2021-10-01 11:40 UTC by Martin André
Modified: 2022-03-10 16:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: RAM validation for OpenStack flavor checked for value using a wrong unit. Consequence: OpenStack flavor validation accepted flavors not meeting the RAM requirements. Fix: Use the correct unit for comparing mininum RAM against value returned by OpenStack. Result: Validation now rejects flavors with insufficient RAM
Clone Of:
Environment:
Last Closed: 2022-03-10 16:14:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 5260 0 None open Bug 2009699: Fix RAM validation for openstack flavors 2021-10-01 11:49:28 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:15:06 UTC

Description Martin André 2021-10-01 11:40:08 UTC
OpenStack flavor validation has a unit conversion issue that causes it to to accept flavors not meeting the RAM requirements.

When deploying using a very small flavor where none of the disk, ram or vcpu should pass, the installer only fails for disk and vcpu.

FATAL failed to fetch Master Machines: failed to load asset "Install Config": [controlPlane.platform.openstack.type: Invalid value: "m1.tiny": Flavor did not meet the following minimum requirements: Must have minimum of 4 VCPUs, had 1; Must have minimum of 25 GB Disk, had 10 GB]


moc-dev ❯ openstack flavor show m1.tiny -c name -c ram -c vcpus -c disk
+-------+---------+
| Field | Value   |
+-------+---------+
| disk  | 10      |
| name  | m1.tiny |
| ram   | 1024    |
| vcpus | 1       |
+-------+---------+

https://github.com/openshift/installer/blob/f8a383b/pkg/asset/installconfig/openstack/validation/machinepool.go#L21-L32

Comment 3 Itay Matza 2021-10-05 12:53:15 UTC
Verified successfully on RHOS-16.1-RHEL-8-20210916.n.0 with openshift-install version:
openshift-install 4.10.0-0.nightly-2021-10-04-213416
built from commit 0410867f3047ed47a907b50a56fdc58899a9e022
release image registry.ci.openshift.org/ocp/release@sha256:ad0221f469febff1e9547ccbbce550beed6219c4883a32365c0a52c17245e0e1
release architecture amd64


1. Using the following flavor:
>$ openstack flavor create --public m1.tiny --id auto --ram 1024 --disk 10 --vcpus 1
>$ openstack flavor show m1.tiny -c name -c ram -c vcpus -c disk
>+-------+---------+
>| Field | Value   |
>+-------+---------+
>| disk  | 10      |
>| name  | m1.tiny |
>| ram   | 1024    |
>| vcpus | 1       |
>+-------+---------+
$ grep computeFlavor install-config.yaml 
    computeFlavor:    "m1.tiny"

The flavor validation blocks the installation on disk, RAM, and vCPU as should:
>$ openshift-install create cluster --dir ostest/
>FATAL failed to fetch Metadata: failed to load asset "Install Config": [controlPlane.platform.openstack.type: Invalid value: "m1.tiny": Flavor did not meet the following minimum requirements: Must have minimum of 16384 MB RAM, had 1024 MB; Must have minimum of 4 VCPUs, had 1; Must have minimum of 25 GB Disk, had 10 GB, compute[0].platform.openstack.type: Invalid value: "m1.tiny": Flavor did not meet the following minimum requirements: Must have minimum of 8192 MB RAM, had 1024 MB; Must have minimum of 2 VCPUs, had 1; Must have minimum of 25 GB Disk, had 10 GB] 


2. Using a flavor that doesn't meet the minimum requirements just for RAM:
>$ openstack flavor show m1.limit_tiny -c name -c ram -c vcpus -c disk
>+-------+---------------+
>| Field | Value         |
>+-------+---------------+
>| disk  | 25            |
>| name  | m1.limit_tiny |
>| ram   | 8190          |
>| vcpus | 4             |
>+-------+---------------+
>$ openshift-install create cluster --dir ostest/
>FATAL failed to fetch Metadata: failed to load asset "Install Config": [controlPlane.platform.openstack.type: Invalid value: "m1.limit_tiny": Flavor did not meet the following minimum requirements: Must have minimum of 16384 MB RAM, had 8190 MB, compute[0].platform.openstack.type: Invalid value: "m1.limit_tiny": Flavor did not meet the following minimum requirements: Must have minimum of 8192 MB RAM, had 8190 MB]

Comment 4 ShiftStack Bugwatcher 2021-11-25 16:12:41 UTC
Removing the Triaged keyword because:

* the QE automation assessment (flag qe_test_coverage) is missing

Comment 7 errata-xmlrpc 2022-03-10 16:14:46 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


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