Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2018443

Summary: On a DU node deployed via ZTP process the performance-operator pod has limits set
Product: OpenShift Container Platform Reporter: Marius Cornea <mcornea>
Component: Performance Addon OperatorAssignee: Martin Sivák <msivak>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.9CC: alukiano, aos-bugs, dgonyier, grajaiya, shajmakh
Target Milestone: ---   
Target Release: 4.10.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-03-10 19:34:25 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 Marius Cornea 2021-10-29 10:57:17 UTC
Description of problem:

On a DU node deployed via ZTP process the performance-operator pod has limits set. According to BZ#1957291 it should only have requests but not limits set and test case [rfe_id:27368][performance] Performance Operator [test_id:44885] Should have CPU and Memory requests but not limits - BZ 1957291 is failing.

Version-Release number of selected component (if applicable):
performance-addon-operator.v4.9.1
performance-addon-operator.v4.8.2

How reproducible:
100%

Steps to Reproduce:
1. Deploy DU node via ZTP process
2. Run cnf-tests

Actual results:
[rfe_id:27368][performance] Performance Operator [test_id:44885] Should have CPU and Memory requests but not limits - BZ 1957291 fails

Expected results:
No failure

Additional info:

oc -n openshift-performance-addon-operator get pods performance-operator-8699594d45-2rmkc -o json | jq .spec.containers[0].resources
{
  "limits": {
    "management.workload.openshift.io/cores": "10"
  },
  "requests": {
    "management.workload.openshift.io/cores": "10",
    "memory": "25Mi"
  }
}

Comment 1 Martin Sivák 2021-11-30 15:05:06 UTC
Oh, it seems the test is not smart enough to distinguish the pre-rewrite and post-rewrite resources.

Comment 2 Martin Sivák 2021-12-02 08:39:33 UTC
@dgonyier @artyom Folks, can you please check this bug? I believe PAO is configured properly and it is the workload partitioning logic who creates the limits here. It seems our tests are not ready for that.

Comment 3 Artyom 2021-12-02 09:48:10 UTC
It is not about the PAO, it is about the workload logic, for custom resources you should set both limits and requests, it is the reason why the management logic is doing it. You can check others OpenShift pods under the environment and you will see the same picture.

Comment 4 Artyom 2021-12-02 09:51:15 UTC
The important things it does not change the QoS class of the pod.

Comment 5 Dwaine Gonyier 2021-12-02 14:54:04 UTC
I saw this behavior in https://bugzilla.redhat.com/show_bug.cgi?id=2019924 as well, but there was no mention there of whether the PAO limits and requests shown with WP enabled are correct.

@alukiano is the output from the BZ description here always the case for PAO on SNO with WP?

> oc -n openshift-performance-addon-operator get pods performance-operator-8699594d45-2rmkc -o json | jq .spec.containers[0].resources
> {
>   "limits": {
>     "management.workload.openshift.io/cores": "10"
>   },
>   "requests": {
>     "management.workload.openshift.io/cores": "10",
>     "memory": "25Mi"
>   }
> }

Comment 6 Artyom 2021-12-06 10:02:12 UTC
Yes, it always will be true for every burstable pod with the workload annotation(the same true also for non SNO environments)

Comment 7 Dwaine Gonyier 2022-01-11 20:01:42 UTC
Fixed in PR https://github.com/openshift-kni/performance-addon-operators/pull/793

@mcornea can you verify?

Comment 8 Martin Sivák 2022-01-12 08:02:16 UTC
Btw, it might be necessary to update cnf-feature-deploy repository and vendor in the new content.

Comment 9 Marius Cornea 2022-02-08 09:30:13 UTC
(In reply to Dwaine Gonyier from comment #7)
> Fixed in PR
> https://github.com/openshift-kni/performance-addon-operators/pull/793
> 
> @mcornea can you verify?

I re-tested on the latest downstream cnf-tests image: registry-proxy.engineering.redhat.com/rh-osbs/openshift4-cnf-tests:v4.10.0-60 and the same error showed up:

[rfe_id:27368][performance]
/remote-source/app/vendor/github.com/openshift-kni/performance-addon-operators/functests/1_performance/performance.go:56
  Performance Operator
  /remote-source/app/vendor/github.com/openshift-kni/performance-addon-operators/functests/1_performance/performance.go:83
    [test_id:44885] Should have CPU and Memory requests but not limits - BZ 1957291 [It]
    /remote-source/app/vendor/github.com/openshift-kni/performance-addon-operators/functests/1_performance/performance.go:101

    Container has CPU Request <= 0
    Expected
        <bool>: false
    to be true

    /remote-source/app/vendor/github.com/openshift-kni/performance-addon-operators/functests/1_performance/performance.go:112


Could you please check if the fix ended in the image?

Comment 11 Shereen Haj Makhoul 2022-02-23 11:16:11 UTC
verification:

version:
ocp: 4.10.0-rc.3
pao: performance-addon-operator-container-v4.10.0-32

Random Seed: 1645613544
Will run 1 of 195 specs

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
[rfe_id:27368][performance] Performance Operator 
  [test_id:44885] Should have CPU and Memory requests but not limits - BZ 1957291
  /remote-source/app/vendor/github.com/openshift-kni/performance-addon-operators/functests/1_performance/performance.go:101
STEP: Checking Resource.Limits.Memory()
STEP: Workload Partitioning enabled, checking custom resource Resources.Requests["management.workload.openshift.io/cores"]
STEP: Checking Resources.Requests.Memory()
•SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
JUnit report was created: /junit.xml/cnftests-junit.xml

Ran 1 of 195 Specs in 131.576 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 194 Skipped

Verified.

Comment 14 errata-xmlrpc 2022-03-10 19:34:25 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.10 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/RHEA-2022:0640