On Wed, Nov 11, 2009 at 01:22:16AM +0530, Balbir Singh wrote:
> * Jan Safranek <[email protected]> [2009-11-06 16:15:10]:
> 
> > On 11/06/2009 12:46 PM, Dhaval Giani wrote:
> > >Signed-off-by: Dhaval Giani<[email protected]>
> > >---
> > >  samples/namespace_config.conf |   57 
> > > ++++++++++++++++++++++++++++++++++++++++++
> > >  1 file changed, 57 insertions(+)
> > >
> > >Index: libcg/samples/namespace_config.conf
> > >===================================================================
> > >--- /dev/null
> > >+++ libcg/samples/namespace_config.conf
> > >@@ -0,0 +1,57 @@
> > >+#
> > >+#  Copyright IBM Corporation. 2009
> > >+#
> > >+#  Authors:       Dhaval Giani<[email protected]>
> > >+#  This program is free software; you can redistribute it and/or modify it
> > >+#  under the terms of version 2.1 of the GNU Lesser General Public License
> > >+#  as published by the Free Software Foundation.
> > >+#
> > >+#  This program is distributed in the hope that it would be useful, but
> > >+#  WITHOUT ANY WARRANTY; without even the implied warranty of
> > >+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > >+#
> > >+group www {
> > >+  perm {
> > >+          task {
> > >+                  uid = root;
> > >+                  gid = webmaster;
> > >+          }
> > >+          admin {
> > >+                  uid = root;
> > >+                  gid = root;
> > >+          }
> > >+  }
> > >+  cpu {
> > >+          cpu.shares = 1000;
> > >+  }
> > >+  cpuacct {
> > >+  }
> > >+}
> > >+
> > >+group ftp {
> > >+  perm {
> > >+          task {
> > >+                  uid = root;
> > >+                  gid = ftpmaster;
> > >+          }
> > >+          admin {
> > >+                  uid = root;
> > >+                  gid = root;
> > >+          }
> > >+  }
> > >+  cpu {
> > >+          cpu.shares = 500;
> > >+  }
> > >+  cpuacct {
> > >+  }
> > >+}
> > >+
> > >+mount {
> > >+  cpu = /mnt/cgroups/cpu;
> > >+  cpuacct = /mnt/cgroups/cpuacct;
> > >+}
> > >+
> > >+namespace {
> > >+  cpu = daemons;
> > >+  cpuacct = daemons;
> > >+}
> > 
> > Could there be some description what's expected result of
> > cgconfigparser -l namespace_config.conf ?
> > 
> 
> I'd expect all directories specified under group to be created with
> namespace as a part of the path.
> 
> > Because from the patch descriptions I was not able to decipher it's:
> > cpu,cpuacct:/daemons
> > cpu,cpuacct:/daemons/www
> > cpu,cpuacct:/daemons/ftp
> > 
> > I though it's a bug! When reading the file I expected the
> > cgconfigparser processes it top-down (I though it's common sense)
> > and it describes cpu,cpuacct:/www, cpu,cpuacct:/ftp instead.
> > "namespace {}" at the end modifies interpretation of the already
> > defined groups! Is my common sense wrong?
> > 
> > What about:
> > 
> > namespace {
> >     cpu = daemons;
> >     cpuacct = daemons;
> >     group ftp { ... }
> >     group www { ... }
> > }
> > 
> 
> I like this syntax, I'll think more about migrating to this format.
> Thanks for the suggestion.
> 

No, I am not so sure of the same :-). It is a little complicated. (Not
just that, the grammer does not seem so trivial. But that might just be
friday evening lack of concentration :-) )

This discussion did though make me realize we should make mount{} and
namespace{} sections in configuration files mutually exclusive.

thanks,
-- 
regards,
Dhaval

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

Reply via email to