Bug 1255776 - cgset truncates values to command arguments
cgset truncates values to command arguments
Status: NEW
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libcgroup (Show other bugs)
6.7
All Linux
unspecified Severity low
: rc
: ---
Assigned To: Nikola Forró
Chao Ye
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-21 10:17 EDT by James Pearson
Modified: 2017-09-14 08:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description James Pearson 2015-08-21 10:17:38 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):

libcgroup-0.40.rc1-16

How reproducible:

Always

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
testgroup:
cpuset.cpus: 0-35

Actual results:

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

Expected results:

All listed cores assigned to the cgroup (first 48 in this case)

Additional info:

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:

http://permalink.gmane.org/gmane.comp.lib.libcg.devel/4350

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