Bug 2089414

Summary: Missing validation check between isolated and offline CPUs
Product: OpenShift Container Platform Reporter: Mario Fernández <mariofer>
Component: Performance Addon OperatorAssignee: Martin Sivák <msivak>
Status: CLOSED ERRATA QA Contact: Gowrishankar Rajaiyan <grajaiya>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.11CC: fromani, shajmakh
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 12:16:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mario Fernández 2022-05-23 15:43:11 UTC
Description of problem:
If isolated and offlined cpus overlaps throws no error.


Version-Release number of selected component (if applicable):

4.11

How reproducible:
  cpu:
    isolated: "1"
    reserved: "0"
    offlined: "1,2,3"


Steps to Reproduce:
1. Apply PefromanceProfile
2.


Actual results:
It works


Expected results:
Fails, error sh own.


Additional info:

Comment 2 Shereen Haj Makhoul 2022-07-28 13:57:52 UTC
Verification: 

OCP version: 4.11.0-rc.4

Steps:
Apply the following profile with overlap between isolated and offlined cpus:


apiVersion: performance.openshift.io/v2
kind: PerformanceProfile
metadata:
  name: performance-bugverf
spec:
  cpu:
    isolated: "3"
    reserved: "0-2"
    offlined: "3,4,5"
  realTimeKernel:
    enabled: true
  nodeSelector:
    node-role.kubernetes.io/workercnf: ""

# oc apply  -f  pp.yaml 
The PerformanceProfile "performance-bugverf" is invalid: spec.cpu: Invalid value: v2.CPU{Reserved:(*v2.CPUSet)(0xc000747520), Isolated:(*v2.CPUSet)(0xc000747500), BalanceIsolated:(*bool)(nil), Offlined:(*v2.CPUSet)(0xc000747510)}: isolated and offlined cpus overlap: [3]


# oc get performanceprofile  -A
No resources found

as can be seen, the profile is not created and error notification is displayed: "isolated and offlined cpus overlap: [3]"

Comment 6 errata-xmlrpc 2022-08-10 12:16: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 (OpenShift Container Platform 4.11 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:5869