Hi Rishikesh,

Rishikesh wrote:
>>>> cg_set_control_value() is the function for setting a value to a file
>>>> of cgroup file system. And current function does not handle the error
>>>> of writing to a file. So we cannot know whether setting value is
>>>> enable or not.
>>>>
>>>> This patch adds the error handling for knowing it.
>>>>       
>>> The changelog does not document the motivation to move to open() from
>>> fopen(). Any particular reason for doing so?
>>>     
>>
>> Sorry for not writing my motivation.
>>
>> If an administrator sets an invalid value in /etc/cgconfig.conf,
>> current 'cgconfig' service cannot set it but the service does not
>> inform him/her of the error.
>> I'd like to add the handling against the error to know it.
>>
>>
>> For example, cpuset.mems is an invalid value in /etc/cgconfig.conf
>> because the system is not multi nodes system, but the service does
>> not handle it.
>>
>>   # cat /etc/cgconfig.conf
>>   mount {
>>         cpuset = /mnt/cgroups/cpuset;
>>   }
>>   group usergroup {
>>         cpuset {
>>                 cpuset.cpus = 0;
>>                 cpuset.mems = 0-100;
>>         }
>>   }
>>
>>   # service cgconfig start
>>   Starting cgconfig service:                                 [  OK  ]
>>   # cat /mnt/cgroups/cpuset/usergroup/cpuset.mems
>>
>>   # cat /mnt/cgroups/cpuset/usergroup/cpuset.cpus
>>   0
>>   #
>>
>>
>> If the patch is applied, the service can handle the error and the
>> service fails by an invalid value like the following.
>>   
> 
> Hi all,
> 
> I am also facing the same issue, but after applying this patch i could
> not get the expected result.
> 
> [r...@mhs21a sysdefault]# echo 0-100 > cpuset.mems
> -bash: echo: write error: Invalid argument
> [r...@mhs21a sysdefault]# cat /etc/cgconfig.conf
> mount {
> cpuset = /mnt/cgroups/cpuset;
> }
> group usergroup {
> cpuset {
>    cpuset.cpus = 0;
>    cpuset.mems = 0-100;
> }
> }
> [r...@mhs21a sysdefault]# cd
> [r...@mhs21a ~]# service cgconfig restart
> Stopping cgconfig service:                                 [  OK  ]
> Starting cgconfig service:                                 [  OK  ]
> [r...@mhs21a ~]#
> 
> Do i need to do something else over here ?

What is the git commit-id of libcgroup source ?
I applied the patch to the latest source code (commit 
5dfd5d40b68febd5376e6823021e4b376de77efc).
Unfortunately, I do not have something else.


Thanks
Ken'ichi Ohmichi

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to