Bug 1777173 - CPU Accounting is not enabled by default
Summary: CPU Accounting is not enabled by default
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.11.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Ryan Phillips
QA Contact: Sunil Choudhary
URL:
Whiteboard:
Depends On: 1692131
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-27 03:53 UTC by Guanghui
Modified: 2023-10-06 18:49 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1692131
Environment:
Last Closed: 2019-12-02 17:18:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Guanghui 2019-11-27 03:53:52 UTC
Description of problem:

atomic-openshift-node.service logs show the following message:
~~~
Failed to get system container stats for "/system.slice/atomic-openshift-node.service": failed to get cgroup stats for "/system.slice/atomic-openshift-node.service": failed to get container info for "/system.slice/atomic-openshift-node.service": unknown container "/system.slice/atomic-openshift-node.service"
container_manager_linux.go:793] CPUAccounting not enabled for pid: xxxx
container_manager_linux.go:796] MemoryAccounting not enabled for pid: xxxx
~~~

Version-Release number of selected component (if applicable):
~~~
oc v3.11.154
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://lb.guachen.ocp:443
openshift v3.11.154
kubernetes v1.11.0+d4cacc0
~~~

How reproducible:
Always

Steps to Reproduce:
1. install cluster
2. ssh to node
3. journalctl -u atomic-openshift-node.service 

Actual results:
CPU/Memory Accounting is not enabled by default

Expected results:
CPU/Memory Accounting is enabled by default

Additional info:
~~~
# cat /etc/systemd/system.conf.d/origin-accounting.conf 
[Manager]
DefaultCPUAccounting=yes
DefaultMemoryAccounting=yes
DefaultBlockIOAccounting=yes

# systemctl show docker|grep Account
CPUAccounting=no
BlockIOAccounting=no
MemoryAccounting=no
TasksAccounting=no
~~~
CPU/Memory Accounting should be enabled by default.

Comment 1 Ryan Phillips 2019-12-02 14:59:29 UTC
Did you restart docker, and then restart Kubelet? Both restarts are necessary to enable accounting.

Comment 2 Guanghui 2019-12-02 15:14:10 UTC
Yes, I tried both restart docker and atom-openshift-node, but it didn't work.

I found that the system had to be rebooted to take effect.

Comment 3 Ryan Phillips 2019-12-02 15:57:50 UTC
For systemd to detect the new configuration file the following command will pick that up: `systemctl daemon-reexec`.


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