Bug 2033011 - [release-4.9] spec.cpu.reserved is not set correctly by default if only spec.cpu.isolated is defined in PerformanceProfile
Summary: [release-4.9] spec.cpu.reserved is not set correctly by default if only spec...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Performance Addon Operator
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.9.z
Assignee: Mario Fernández
QA Contact: Gowrishankar Rajaiyan
URL:
Whiteboard:
Depends On: 1986681
Blocks: 2033292
TreeView+ depends on / blocked
 
Reported: 2021-12-15 17:00 UTC by Mario Fernández
Modified: 2022-02-22 15:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: CPU reserved field its not required in CRD. Consequence: CPU reserved can be ommited Fix: Fix documentation and add CPU reserved required Result: Correct Documentation
Clone Of:
: 2033292 (view as bug list)
Environment:
Last Closed: 2022-01-10 14:42:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift-kni performance-addon-operators pull 798 0 None open [release-4.9] Set isolated and required CPU parameter in CRD 2021-12-15 17:00:56 UTC
Red Hat Product Errata RHBA-2022:0046 0 None None None 2022-01-10 14:43:00 UTC

Comment 4 Shereen Haj Makhoul 2022-01-05 07:08:46 UTC
Verification:

Versions:
OCP: 4.9.12
PAO: performance-addon-operator-container-v4.9.4-6

# cat performance_profile.yaml 
apiVersion: performance.openshift.io/v2
kind: PerformanceProfile
metadata:
  name: performance
spec:
  cpu:
    isolated: "3-5"
  realTimeKernel:
    enabled: true
  nodeSelector:
    node-role.kubernetes.io/worker-cnf: ""

# oc apply -f  performance_profile.yaml 
The PerformanceProfile "performance" is invalid: spec.cpu.reserved: Required value

# oc get performanceprofile 
No resources found

According to the output above, a PP cannot be created without specifying spec.cpu.reserved value.

Comment 5 Shereen Haj Makhoul 2022-01-06 09:31:20 UTC
A complement to the verification above:

Verify that PAO CRD displays the correct required fields:

oc describe crd performanceprofiles.performance.openshift.io
..
 Description:  CPU defines a set of CPU related parameters.
                Properties:
                  Balance Isolated:
                    Description:  BalanceIsolated toggles whether or not the Isolated CPU set is eligible for load balancing work loads. When this option is set to "false", the Isolated CPU set will be static, meaning workloads have to explicitly assign each thread to a specific cpu in order to work across multiple CPUs. Setting this to "true" allows workloads to be balanced across CPUs. Setting this to "false" offers the most predictable performance for guaranteed workloads, but it offloads the complexity of cpu load balancing to the application. Defaults to "true"
                    Type:         boolean
                  Isolated:
                    Description:  Isolated defines a set of CPUs that will be used to give to application threads the most execution time possible, which means removing as many extraneous tasks off a CPU as possible. It is important to notice the CPU manager can choose any CPU to run the workload except the reserved CPUs. In order to guarantee that your workload will run on the isolated CPU:   1. The union of reserved CPUs and isolated CPUs should include all online CPUs   2. The isolated CPUs field should be the complementary to reserved CPUs field
                    Type:         string
                  Reserved:
                    Description:  Reserved defines a set of CPUs that will not be used for any container workloads initiated by kubelet.
                    Type:         string
                Required:
                  isolated
                  reserved    <========================= 
                Type:  object

according to the CRD description, "reserved" field is now stated as required.

Comment 7 errata-xmlrpc 2022-01-10 14:42: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 (OpenShift Container Platform 4.9.13 low-latency extras 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-2022:0046


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