This patchset adds the possibility to set template control group, which is used 
as a template for some group of control groups.
Template group can be created on-fly, when cgroup_change_cgroup_flags call want 
to use control group based on template name which does not exist yet.

Template group is a group which name contains template string - that means a 
string which contains %U, %u, %G, %g, %P or %p tag(s).
rules which uses template groups can be specified in cgrules.conf:
e.g.:
@students cpu,cpuacct    students/%u

template group specification can be done using cgconfig.conf file (they have to 
have keyword template):
e.g.:
        template students/%u {
                cpuacct{
                }
                cpu {
                }
        }

For now all control groups which are necessary for creating template group and 
which are not present are created with the default kernel values.

The templates can be cached (the similar way as rules) to prevent to read 
config file too often. SIGUSR1 reload the template cache.

Documentation is updated to reflect this changes.

---

Ivana Hutarova Varekova (8):
      update documentation to reflect the changes regarding templates
      cgroup_change_cgroup_flags: use templates if they are in rules
      cgrulesengd: cache templates
      api: add function for creating template control groups
      config.h: create function for init/reload cgconfig template cache
      cgconfig.conf: parse template tag and fill relevant structures
      cgconfigparser: add template tag to cgconfigparser
      cgroup_change_cgroup_flags: create template control group on the fly


 README_daemon              |    8 +
 doc/man/cgconfig.conf.5    |   54 +++++
 doc/man/cgexec.1           |    8 +
 doc/man/cgrules.conf.5     |   23 ++
 doc/man/cgrulesengd.8      |    1 
 include/libcgroup/config.h |   30 +++
 include/libcgroup/tasks.h  |    4 
 src/api.c                  |  171 +++++++++++++++++
 src/config.c               |  444 +++++++++++++++++++++++++++++++++++++++++---
 src/daemon/cgrulesengd.c   |   41 ++++
 src/daemon/cgrulesengd.h   |    7 +
 src/lex.l                  |    3 
 src/libcgroup-internal.h   |    7 +
 src/libcgroup.map          |    6 +
 src/parse.y                |  136 +++++++++++++
 15 files changed, 901 insertions(+), 42 deletions(-)

-- 

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to