Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpuset disappears from /sys/fs/cgroup/cgroup.subtree_control after adding it #443

Closed
harche opened this issue Jun 12, 2024 · 3 comments
Closed

Comments

@harche
Copy link

harche commented Jun 12, 2024

After the OS boots and the kubelet starts, it adds cpuset to /sys/fs/cgroup/cgroup.subtree_control. However, it seems that kubelet calls the runc method setUnitProperties, which in turn calls SetUnitPropertiesContext from the go-systemd library. At this point, we notice that the cpuset, which was already present, gets removed (for reasons unknown). This causes kubelet to restart, but this time, the cpuset gets added back and remains in /sys/fs/cgroup/cgroup.subtree_control.

More details are in the description of kubernetes/kubernetes#122955

On my local OCP node, I was able to observe this issue as well,

[root@ip-10-0-2-54 ~]# systemctl restart kubelet
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma misc                      <<<<<< cpuset is added
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control    
cpu io memory hugetlb pids rdma misc                             <<<<<< gone here. 
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma misc                      <<<<<< kubelet restart, and it is back again. 
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma misc
[root@ip-10-0-2-54 ~]# cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma misc
@harche
Copy link
Author

harche commented Jun 12, 2024

I have observed this happening only on cgroup v2 systems.

@haircommander
Copy link

I think kubernetes/kubernetes#125923 fixes this

@harche
Copy link
Author

harche commented Jul 5, 2024

/close as it seems the bug was in the kubelet code.

@harche harche closed this as completed Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants