Ken'ichi Ohmichi wrote:
> Hi Balbir,
>
> Balbir Singh wrote:
>
>> On Wed, Nov 25, 2009 at 12:20 PM, Ken'ichi Ohmichi
>> <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> 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 ?
-Rishi
> # 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: Loading configuration file /etc/cgconfig.conf
> failed
> Numerical result out of range
> Failed to parse /etc/cgconfig.conf [FAILED]
> [r...@localhost libcg]#
>
>
> Thanks
> Ken'ichi Ohmichi
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Libcg-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libcg-devel
>
------------------------------------------------------------------------------
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