rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 656 forks source link

How to make CPUAccounting and MemoryAccounting enable ? #2832

Open Doublemine opened 5 years ago

Doublemine commented 5 years ago

RancherOS Version: (ros os version) version v1.5.2 from os image rancher/os:v1.5.2

Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) VMware EXSI 6.7 & 2 core cpu & 2G memory per instance

User Docker Version 18.09.2

RKE Version rke version v0.2.4

Steps to Reproduce: Built a k8s cluster by RKE, and got some warn logs for kubelet container:

rancher@ros-slave2:~$ docker logs -f kubelet
I0710 16:47:26.214917   18221 container_manager_linux.go:434] [ContainerManager]: Discovered runtime cgroups name: /
W0710 16:47:26.216034   18221 container_manager_linux.go:804] CPUAccounting not enabled for pid: 18221
W0710 16:47:26.216082   18221 container_manager_linux.go:807] MemoryAccounting not enabled for pid: 18221
W0710 16:52:26.216337   18221 container_manager_linux.go:804] CPUAccounting not enabled for pid: 1563
W0710 16:52:26.216405   18221 container_manager_linux.go:807] MemoryAccounting not enabled for pid: 1563
I0710 16:52:26.216437   18221 container_manager_linux.go:434] [ContainerManager]: Discovered runtime cgroups name: /
W0710 16:52:26.216583   18221 container_manager_linux.go:804] CPUAccounting not enabled for pid: 18221
W0710 16:52:26.216606   18221 container_manager_linux.go:807] MemoryAccounting not enabled for pid: 18221
W0710 16:57:26.216946   18221 container_manager_linux.go:804] CPUAccounting not enabled for pid: 1563
W0710 16:57:26.217100   18221 container_manager_linux.go:807] MemoryAccounting not enabled for pid: 1563
I0710 16:57:26.217175   18221 container_manager_linux.go:434] [ContainerManager]: Discovered runtime cgroups name: /
W0710 16:57:26.217353   18221 container_manager_linux.go:804] CPUAccounting not enabled for pid: 18221
W0710 16:57:26.217415   18221 container_manager_linux.go:807] MemoryAccounting not enabled for pid: 18221

rancher@ros-slave2:~$ ps aux | grep 1563
root      1563  0.9  3.8 715856 79540 ?        Ssl  Jul09  14:27 dockerd --log-opt max-file=2 --log-opt max-size=25m --group docker --host unix:///var/run/docker.sock
rancher   5788  0.0  0.0  11112   952 pts/0    S+   17:03   0:00 grep 1563

rancher@ros-slave2:~$ ps aux | grep 18221
rancher   6257  0.0  0.0  11112   968 pts/0    S+   17:04   0:00 grep 18221
root     18221  1.3  5.7 736788 116532 ?       Ssl  16:22   0:35 kubelet --hostname-override=192.168.1.12 --fail-swap-on=false --read-only-port=0 --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --streaming-connection-idle-timeout=30m --pod-infra-container-image=rancher/pause:3.1 --enforce-node-allocatable= --event-qps=0 --v=2 --allow-privileged=true --authentication-token-webhook=true --cluster-dns=10.43.0.10 --resolv-conf=/etc/resolv.conf --volume-plugin-dir=/var/lib/kubelet/volumeplugins --cloud-provider= --root-dir=/opt/rke/var/lib/kubelet --cgroup-driver=cgroupfs --address=0.0.0.0 --network-plugin=cni --kubeconfig=/etc/kubernetes/ssl/kubecfg-kube-node.yaml --anonymous-auth=false --make-iptables-util-chains=true --cgroups-per-qos=True --cni-bin-dir=/opt/cni/bin --cni-conf-dir=/etc/cni/net.d --cluster-domain=cluster.local --cgroup-driver=cgroupfs

How can i enable the accounting without systemd ?

igorcezar commented 4 years ago

Any news on this?