[augeas-devel] cgconfig.conf augeas lenses and its test file

Ivana Hutarova Varekova varekova at redhat.com
Tue Feb 9 09:13:44 UTC 2010


Hello,
I write my comments to the text directly:

On 02/08/2010 08:37 PM, David Lutterkort wrote:
> On Mon, 2010-02-08 at 08:24 +0100, Ivana Hutarova Varekova wrote:
>    
>> With Raphael Pinson large help I write a lense for cgconfig.conf configuration
>> file and test file for it.
>> (cgconfig.conf file is a part of libcgroup tool -http://libcg.sourceforge.net/)
>> I'm sending them in attachment.
>> If there are any problems please ping me.
>>      
> Nice. Thanks for doing these. One question: a mount entry like
>
>     mount { cpu = /mnt/cgroups/cpu; }
>
> is mapped to a tree like
>
>     { "mount" { "1" { "controller" = "cpu" } { "mount_point" = "/mnt/cgroups/cpu" } } }
>
> and the lens allows arbitrary names for the name if the mount. As far as
> I understand the cgconfig.conf manpage, the controller name can only be
> one of the cont_name names, even though the lens allows anything there.
> Shouldn't that be changed to the fixed controller names the kernel
> understands ?
>    
The set of controllers is still in change so for me it should not be 
restrict to only the current ones. Perhaps when the set is more stable 
it would be useful to have them hardcoded.

> Also, wouldn't it be simpler to map the above mount line to a tree like
>
>     { "mount" { "cpu" = "/mnt/cgroups/cpu" } }
>
> That would lead to a much more compact (and hopefully understandable) tree.
>    
I agree seems better for me.

> Similarly, the controller entries in a group could be simplified to
> yield a flatter tree, so that the get test for group1 in
> test_cgconfig.aug would look something like
>
>          test Cgconfig.lns get group1 =
>            {  }
>            { "group"
>              { "name" = "user" }
>              {  }
>              { "controller" = "cpuacct"
>                {  }
>                { "lll" = "jjj" } }
>              {  } }
>              {  }
>              { "controller" = "cpu"
>                {  } }
>              {  } }
>
>    
I agree again - good idea.
Do you prefer to get a patch for this two issues from me, or do you 
preffer to create it yourself?

Ivana




More information about the augeas-devel mailing list