Bug 2009787 - 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.9.0
Assignee: Martin André
QA Contact: Itay Matza
Olivia Payne
URL:
Whiteboard:
Depends On: 2009699
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-01 15:02 UTC by OpenShift BugZilla Robot
Modified: 2021-11-12 14:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, OpenStack flavor validation accepted flavors not meeting the RAM requirements using the wrong unit. With this update, the correct unit is used for comparing minimum RAM against value returned by OpenStack.
Clone Of:
Environment:
Last Closed: 2021-11-10 21:01:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 5262 0 None open [release-4.9] Bug 2009787: Fix RAM validation for openstack flavors 2021-10-01 15:02:15 UTC
Red Hat Product Errata RHBA-2021:4119 0 None None None 2021-11-10 21:02:11 UTC

Description OpenShift BugZilla Robot 2021-10-01 15:02:02 UTC
+++ This bug was initially created as a clone of Bug #2009699 +++

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-11-03 15:18:45 UTC
Verified successfully on RHOS-16.1-RHEL-8-20211007.n.1 with openshift-install version:
openshift-install 4.9.0-0.nightly-2021-11-03-043308
built from commit 1c538b8949f3a0e5b993e1ae33b9cd799806fa93
release image registry.ci.openshift.org/ocp/release@sha256:d19fe372f972ab6986c9cfb1fff8081a2c68c40933ea23fedcb82f270c3379eb
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 6 errata-xmlrpc 2021-11-10 21:01:58 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 (OpenShift Container Platform 4.9.6 bug fix 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/RHBA-2021:4119


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