Bug 1948963 - [RFE] Cluster-api-provider-ovirt should handle hugepages
Summary: [RFE] Cluster-api-provider-ovirt should handle hugepages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.0
Assignee: Liran Rotenberg
QA Contact: michal
URL:
Whiteboard:
Depends On:
Blocks: 1925203
TreeView+ depends on / blocked
 
Reported: 2021-04-13 07:18 UTC by Liran Rotenberg
Modified: 2021-08-01 07:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Providing hugepages property into the machineset is now possible. It will make the machineset's nodes with custom property in ovirt, telling these nodes to use the hugepages of the hypervisor.
Clone Of:
Environment:
Last Closed: 2021-07-27 22:59:58 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-api-provider-ovirt pull 102 0 None open Bug 1948963: add support for hugepages 2021-04-14 08:08:07 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:00:13 UTC

Description Liran Rotenberg 2021-04-13 07:18:03 UTC
urrent state:
cluster-api-provider has no logic for handling hugepages configuration.

What we want:
Cluster API provider should expose logic for adding a created machine having hugepages settings by adding a field for the hugepages in the machine spec.

This means that when you create a machine set you can decide that all the machines will be created with hugepages configuration.

The UI behavior to auto configure high performance VMs with the `existing` policy is not supported.

How to test?
1. Create a machine set with the auto pinning policy, for example:
```yaml
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
  labels:
    machine.openshift.io/cluster-api-cluster: ovirt11-CLUSTERNAME
    machine.openshift.io/cluster-api-machine-role: worker
    machine.openshift.io/cluster-api-machine-type: worker
spec:
  replicas: 1
  selector:
    matchLabels:
      machine.openshift.io/cluster-api-cluster: ovirt11-CLUSTERNAME
      machine.openshift.io/cluster-api-machineset: ovirt11-CLUSTERNAME-worker-1
  template:
    metadata:
      labels:
        machine.openshift.io/cluster-api-cluster: ovirt11-CLUSTERNAME
        machine.openshift.io/cluster-api-machine-role: worker
        machine.openshift.io/cluster-api-machine-type: worker
        machine.openshift.io/cluster-api-machineset: ovirt11-CLUSTERNAME-worker-1
    spec:
      providerSpec:
        value:
          hugepages: 2048
          apiVersion: ovirtproviderconfig.machine.openshift.io/v1beta1
          cluster_id: CLUSTERID
          cpu:
            cores: 8
            sockets: 1
            threads: 1
          credentialsSecret:
            name: ovirt-credentials
          kind: OvirtMachineProviderSpec
          memory_mb: 16000
          os_disk:
            size_gb: 31
          template_name: ovirt11-CLUSTERNAME-rhcos
          type: server
          userDataSecret:
            name: worker-user-data
```
2. Verify that 1 machine is created and added with the provided hugepages provided. In RHV you can see it under the VM's custom properties.
3. scale to 2 replicas and make sure that another machine is created and added with the same hugepages configuration.

Negative test suggestion:
- Try to run it with unsupported values(other than 2048 or 1048576).

Comment 2 michal 2021-04-27 10:24:40 UTC
verify on: 
rhv- 4.4.5.10-0.1
ocp - 4.8.0-0.nightly-2021-04-24-175929 

steps:
1) create machineset with 2048 hugepages - verify before that there is enough space in the host               
 ( vi  /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
2) verify that machine created in rhv with custom property - 2048kb
3) scale to 2 replicas and make sure that another machine is created and added with the same hugepages configuration.
4) create machineset with unsupported values hugepages -for example -20 
error appear: 
failed to create machine: error creating oVirt instance: The machine `hugepages` custom property must be one of the following options: 2048, 1048576. The value: 20 is not valid

Comment 5 errata-xmlrpc 2021-07-27 22:59: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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and 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-2021:2438


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