Bug 1990629

Summary: inspect on the tuning cluster operator does not gather all tuned CRs
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Node Tuning OperatorAssignee: Jiří Mencák <jmencak>
Status: CLOSED ERRATA QA Contact: Simon <skordas>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, dagray, rhowe, skordas
Target Milestone: ---   
Target Release: 4.6.z   
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: 2021-09-09 01:52:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1986739    
Bug Blocks:    

Description OpenShift BugZilla Robot 2021-08-05 18:58:25 UTC
+++ This bug was initially created as a clone of Bug #1986739 +++

+++ This bug was initially created as a clone of Bug #1986576 +++

Description of problem:
inspect on the tuning cluster operator does not gather all tuned CRs, it only gathers the default 

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

How reproducible:
100%

Steps to Reproduce:
1.  Create a test tuned profile in openshift-cluster-node-tuning-operator [1]
2.  oc adm inspect co/tuned or get must-gather
3.  Only default tuned is captured 

Actual results:
 Only default tuned is captured 

Expected results:
 All tuned CRs captured 

Additional info:

```
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
  name: master-custom
  namespace: openshift-cluster-node-tuning-operator
spec:
  profile:
  - data: |
      [main]
      summary=A custom OpenShift IPS host profile
      include=openshift-control-plane
      [sysctl]
      net.core.somaxconn = 10240
      net.core.netdev_max_backlog = 10000
      net.ipv4.tcp_max_syn_backlog = 20480
    name: master-custom
  recommend:
  - match:
    - label: node-role.kubernetes.io/master
    priority: 10
    profile: master-custom
```

--- Additional comment from Jiří Mencák on 2021-07-28 08:57:14 UTC ---

Thank you for the report, Ryan.
Fixed in 4.8+  Putting on QE.

Comment 3 Simon 2021-08-24 14:32:39 UTC
$ oc get clusterversions.config.openshift.io 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2021-08-22-084748   True        False         65m     Cluster version is 4.6.0-0.nightly-2021-08-22-084748

$ oc project openshift-cluster-node-tuning-operator 
Now using project "openshift-cluster-node-tuning-operator" on server "https://api.skordas82446.qe.devcluster.openshift.com:6443".

$ oc adm inspect co/node-tuning
Gathering data for ns/openshift-cluster-node-tuning-operator...
Wrote inspect data to inspect.local.31820469019406869.

$ oc get tuned
NAME            AGE
default         94m
master-custom   110s
rendered        94m

$ cat inspect.local.31820469019406869/namespaces/openshift-cluster-node-tuning-operator/tuned.openshift.io/tuneds/master-custom.yaml 
---
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
  creationTimestamp: "2021-08-24T14:23:29Z"
  generation: 1
  name: master-custom
  namespace: openshift-cluster-node-tuning-operator
  resourceVersion: "47432"
  selfLink: /apis/tuned.openshift.io/v1/namespaces/openshift-cluster-node-tuning-operator/tuneds/master-custom
  uid: 4a39e1f2-cefb-4edd-b9f9-98f368d9dc85
spec:
  profile:
  - data: |
      [main]
      summary=A custom OpenShift IPS host profile
      include=openshift-control-plane
      [sysctl]
      net.core.somaxconn = 10240
      net.core.netdev_max_backlog = 10000
      net.ipv4.tcp_max_syn_backlog = 20480
    name: master-custom
  recommend:
  - match:
    - label: node-role.kubernetes.io/master
    priority: 10
    profile: master-custom

$ oc adm must-gather
[...]

$ cat must-gather.local.6772539269232213597/quay-io-openshift-release-dev-ocp-v4-0-art-dev-sha256-25f87adf18ed9073e81a933f8d8524bc0425052f969347a2c633ba9db0b067a2/namespaces/openshift-cluster-node-tuning-operator/tuned.openshift.io/tuneds/master-custom.yaml 
---
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
  creationTimestamp: "2021-08-24T14:23:29Z"
  generation: 1
  managedFields:
  - apiVersion: tuned.openshift.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:spec:
        .: {}
        f:profile: {}
        f:recommend: {}
    manager: kubectl-create
    operation: Update
    time: "2021-08-24T14:23:29Z"
  name: master-custom
  namespace: openshift-cluster-node-tuning-operator
  resourceVersion: "47432"
  selfLink: /apis/tuned.openshift.io/v1/namespaces/openshift-cluster-node-tuning-operator/tuneds/master-custom
  uid: 4a39e1f2-cefb-4edd-b9f9-98f368d9dc85
spec:
  profile:
  - data: |
      [main]
      summary=A custom OpenShift IPS host profile
      include=openshift-control-plane
      [sysctl]
      net.core.somaxconn = 10240
      net.core.netdev_max_backlog = 10000
      net.ipv4.tcp_max_syn_backlog = 20480
    name: master-custom
  recommend:
  - match:
    - label: node-role.kubernetes.io/master
    priority: 10
    profile: master-custom

Comment 6 errata-xmlrpc 2021-09-09 01:52:52 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.6.44 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:3395