On Fri, Oct 30, 2009 at 03:13:58PM +0530, Dhaval Giani wrote:
> On Wed, Oct 28, 2009 at 03:30:04PM +0900, Ken'ichi Ohmichi wrote:
> >
> > Changelog since v1:
> > o Change a parser error value of /etc/cgconfig.conf to ECGCONFIGPARSEFAIL.
> >
> >
> > The cgconfig service succeeds even if there are something wrong
> > in /etc/cgconfig.conf. For example, it succeeds even if specifying
> > not-existing user (nouser) as a perm.task.uid like the following:
> >
> > # cat /etc/cgconfig.conf
> > mount {
> > cpuset = /mnt/cgroups/cpuset;
> > memory = /mnt/cgroups/memory;
> > }
> > group root {
> > perm {
> > task {
> > uid = nouser;
> > gid = root;
> > }
> > admin {
> > uid = root;
> > gid = root;
> > }
> > }
> > cpuset {
> > cpuset.cpus = 0;
> > cpuset.mems = 0;
> > }
> > memory {
> > memory.use_hierarchy = 1;
> > memory.limit_in_bytes = 1000000000000;
> > }
> > }
> > #
> > # service cgconfig start
> > Starting cgconfig service: parsing failed at line number 10
> > [ OK ]
> > # echo $?
> > 0
> > #
> >
> >
> > I feel that is not a good behavior and the cgconfig service should
> > fail if there are something wrong in /etc/cgconfig.conf.
> > This patch fixes the behavior. In the above case, the behavior is
> > changed like the following by this patch:
> >
> > # service cgconfig start
> > Starting cgconfig service: parsing failed at line number 10
> > Loading configuration file /etc/cgconfig.conf failed
> > Cgroup parsing failed
> > Failed to parse /etc/cgconfig.conf [FAILED]
> > #
> >
> >
> > Signed-off-by: Ken'ichi Ohmichi <[email protected]>
> >
>
>
> Acked-by: Dhaval Giani <[email protected]>
>
sorry, missed one thing.
> > diff --git a/include/libcgroup.h b/include/libcgroup.h
> > index 8cb082d..f2d3192 100644
> > --- a/include/libcgroup.h
> > +++ b/include/libcgroup.h
> > @@ -84,6 +84,7 @@ enum cgroup_errors {
> > ECGROUPNOTEQUAL,
> > ECGCONTROLLERNOTEQUAL,
> > ECGRULESPARSEFAIL, /* Failed to parse rules file (cgrules.conf). */
> > + ECGCONFIGPARSEFAIL,/* Failed to parse config file (cgconfig.conf). */
add the new error values above ECGSENTINEL else we will break ABI.
thanks,
--
regards,
Dhaval
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel