Bug 1979352

Summary: Tuned affining containers to house keeping cpus
Product: OpenShift Container Platform Reporter: browsell
Component: Node Tuning OperatorAssignee: Jiří Mencák <jmencak>
Status: CLOSED ERRATA QA Contact: liqcui
Severity: high Docs Contact:
Priority: medium    
Version: 4.8CC: keyoung, liqcui, sejug
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:38:02 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:
Bug Depends On: 1980715    
Bug Blocks: 1985908    

Comment 5 liqcui 2021-08-03 07:18:04 UTC
Verified Steps:
oc label node ip-10-0-141-106.us-east-2.compute.internal tuned-scheduler-node=

cat scheduler-tuned.yaml
apiVersion: tuned.openshift.io/v1
kind: Tuned
metadata:
  name: ocp-scheduler-profile
  namespace: openshift-cluster-node-tuning-operator
spec:
  profile:
  - data: |
      [main]
      summary=Custom OpenShift profile
      include=openshift-node
      [scheduler]
      isolated_cores=1
      cgroup_ps_blacklist=/kubepods\.slice/
    name: ocp-scheduler-profile
  recommend:
  - match:
    - label:  tuned-scheduler-node
    priority: 20
    profile: ocp-scheduler-profile
    operand:
      debug: true

oc get  pods -n openshift-cluster-node-tuning-operator -o wide |grep ip-10-0-141-106.us-east-2.compute.internal
tuned-9dtg7                                    1/1     Running   0          42m   10.0.141.106   ip-10-0-141-106.us-east-2.compute.internal   <none>           <none>

oc project openshift-cluster-node-tuning-operator

oc rsh tuned-9dtg7

Check the result as below:
sh-4.4# grep ^Cpus_allowed_list /proc/`pgrep openshift-tuned`/status
Cpus_allowed_list:      0-1
sh-4.4# grep Cpus_allowed_list /proc/`pidof chronyd`/status
Cpus_allowed_list:      0

#  grep . /proc/`pidof chronyd`/cgroup 
12:devices:/system.slice/chronyd.service
11:blkio:/system.slice/chronyd.service
10:rdma:/
9:cpuset:/
8:pids:/system.slice/chronyd.service
7:cpu,cpuacct:/system.slice/chronyd.service
6:memory:/system.slice/chronyd.service
5:hugetlb:/
4:perf_event:/
3:net_cls,net_prio:/
2:freezer:/
1:name=systemd:/system.slice/chronyd.service

Comment 8 errata-xmlrpc 2021-10-18 17:38:02 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.9.0 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:3759