Red Hat Bugzilla – Bug 1255776
cgset truncates values to command arguments
Last modified: 2017-10-05 07:49:56 EDT
Description of problem:
cgset truncates the value to set in a cgroup file to 100 characters
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a cpuset cgroup on a box with many logical cores
2. Use cgset to set cpuset.cpus to a list of logical cores - e.g.
cgset -r cpuset.cpus=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47 testgroup
3. Run cgget to list cores in cgroup:
cgget -r cpuset.cpus testgroup
The value of the argument is truncated at 100 characters - so only (in this case) the first 36 logical cores are assigned to the cgroup
All listed cores assigned to the cgroup (first 48 in this case)
The libcgroup code has a hard limit of 100 characters: CG_VALUE_MAX in include/libcgroup/iterators.h
This value is far too small for machines with many logical cores
A simple patch has been suggested upstream, but nothing has happen with this - see:
*** This bug has been marked as a duplicate of bug 1441163 ***
Unfortunately, I don't have access to bug 1441163 ...
Does this mean the problem is/will be fixed?
I'm reopening this BZ and I will update it after bug 1441163 gets resolved one way or the other.