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.
# 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