<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libcg.git/include, branch devel/config3</title>
<subtitle>Unnamed repository; edit this file to name it for gitweb.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/'/>
<entry>
<title>Fix a cgconfig behavior of wrong /etc/cgconfig.conf.</title>
<updated>2009-11-10T19:12:06+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-11-04T01:54:30+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=af926428555f0e827496a1a38ade18a97add7636'/>
<id>af926428555f0e827496a1a38ade18a97add7636</id>
<content type='text'>
Changelog since v2:
o Avoid breaking ABI by changing the ECGCONFIGPARSEFAIL value.

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
 #

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 &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changelog since v2:
o Avoid breaking ABI by changing the ECGCONFIGPARSEFAIL value.

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
 #

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 &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup: Define ECGRULESPARSEFAIL for the parser error of cgrules.conf.</title>
<updated>2009-11-10T19:12:06+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-11-04T01:51:33+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=2378c4f8fb6d32bb73d2f4b9a7281a7b1066fcc9'/>
<id>2378c4f8fb6d32bb73d2f4b9a7281a7b1066fcc9</id>
<content type='text'>
Changelog since v2:
o Define ECGRULESPARSEFAIL for avoiding breaking ABI.

Changelog since v1:
o A new patch [Cleanup: Rename ECGROUPPARSEFAIL to ECGRULESPARSEFAIL.]

Now ECGROUPPARSEFAIL is defined for a parser error of /etc/cgrules.conf and
this patch defines ECGRULESPARSEFAIL for the same value for clarifying its
meaning.

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changelog since v2:
o Define ECGRULESPARSEFAIL for avoiding breaking ABI.

Changelog since v1:
o A new patch [Cleanup: Rename ECGROUPPARSEFAIL to ECGRULESPARSEFAIL.]

Now ECGROUPPARSEFAIL is defined for a parser error of /etc/cgrules.conf and
this patch defines ECGRULESPARSEFAIL for the same value for clarifying its
meaning.

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unnecessary includes from libcgroup.h</title>
<updated>2009-08-29T05:20:25+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-08-06T12:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=6f93cd767947d29c51a8d9fefeb7e582b0a324a2'/>
<id>6f93cd767947d29c51a8d9fefeb7e582b0a324a2</id>
<content type='text'>
libcgroup.h includes some header files, which are not then used. These should
be removed, resp. moved to the source files where they are actually needed.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libcgroup.h includes some header files, which are not then used. These should
be removed, resp. moved to the source files where they are actually needed.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>add api for generating the list of all controllers (not only mount ones)</title>
<updated>2009-08-06T06:29:15+00:00</updated>
<author>
<name>Ivana Hutarova Varekova</name>
<email>varekova@redhat.com</email>
</author>
<published>2009-07-17T07:41:12+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=0d943b1fd84f43edda88d8f1e45a2cfe56b0edeb'/>
<id>0d943b1fd84f43edda88d8f1e45a2cfe56b0edeb</id>
<content type='text'>
this patch add api for generating the list of all controllers (not only mount ones)
- it uses three functions:
cgroup_get_all_controller_begin
cgroup_get_all_controller_next
cgroup_get_all_controller_end

and structure:
struct controller_data {
		char name[FILENAME_MAX];
		int hierarchy;
		int num_cgroups;
		int enabled;
};

the data are read from /proc/cgroups file

Signed-off-by: Ivana Hutarova Varekova &lt;varekova@redhat.com&gt;
Reviewed-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this patch add api for generating the list of all controllers (not only mount ones)
- it uses three functions:
cgroup_get_all_controller_begin
cgroup_get_all_controller_next
cgroup_get_all_controller_end

and structure:
struct controller_data {
		char name[FILENAME_MAX];
		int hierarchy;
		int num_cgroups;
		int enabled;
};

the data are read from /proc/cgroups file

Signed-off-by: Ivana Hutarova Varekova &lt;varekova@redhat.com&gt;
Reviewed-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add recursive cgroup_delete_cgroup_ext.</title>
<updated>2009-08-06T06:27:48+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-08-04T12:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=6c4f6a3e4cf680c2bd488d4121ff4871bd711435'/>
<id>6c4f6a3e4cf680c2bd488d4121ff4871bd711435</id>
<content type='text'>
Changelog:
- add braces to cgroup_delete_cgroup_ext to improve readability
- use enum instead of macro to define flags

The new function allows to recursively delete whole tree of groups. There is
new infrastructure created around (cg_delete_cgroup_controller_recursive).

It has inconsistent behavior when root group removal is requested - it removes
all children (if requested), but does not remove the root itself and returns
success value. This allows simple rewrite of cgclear functions to use this
function.

Original cgroup_delete_cgroup now leads to cgroup_delete_cgroup_ext.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changelog:
- add braces to cgroup_delete_cgroup_ext to improve readability
- use enum instead of macro to define flags

The new function allows to recursively delete whole tree of groups. There is
new infrastructure created around (cg_delete_cgroup_controller_recursive).

It has inconsistent behavior when root group removal is requested - it removes
all children (if requested), but does not remove the root itself and returns
success value. This allows simple rewrite of cgclear functions to use this
function.

Original cgroup_delete_cgroup now leads to cgroup_delete_cgroup_ext.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Configure the location of cgrulesengd socket</title>
<updated>2009-07-01T15:04:50+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-06-30T12:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=a9816059ccbf1d49e86998fb495204d2d7a47309'/>
<id>a9816059ccbf1d49e86998fb495204d2d7a47309</id>
<content type='text'>
This patch allows users to configure location of cgrulesengd socket before
compilation:

./configure --enable-cgred-socket=/var/run/cgred.socket

In addition, /var/run/cgred.socket is now default location of the socket - this
sounds LSB compliant to me. Feel free to suggest better one.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch allows users to configure location of cgrulesengd socket before
compilation:

./configure --enable-cgred-socket=/var/run/cgred.socket

In addition, /var/run/cgred.socket is now default location of the socket - this
sounds LSB compliant to me. Feel free to suggest better one.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup: find better name for CGRULE_CGRED_TEMP_FILE</title>
<updated>2009-07-01T15:04:49+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-06-30T12:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=94a0ad95bc19f181beadef7cf7c4dade556eba7f'/>
<id>94a0ad95bc19f181beadef7cf7c4dade556eba7f</id>
<content type='text'>
Rename CGRULE_CGRED_TEMP_FILE to CGRULE_CGRED_SOCKET_PATH to better describe
the macro usage - it's not a temporary file, it's a socket.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename CGRULE_CGRED_TEMP_FILE to CGRULE_CGRED_SOCKET_PATH to better describe
the macro usage - it's not a temporary file, it's a socket.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the library function cgroup_register_unchanged_process().</title>
<updated>2009-06-29T11:21:10+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-06-26T05:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=1c29610af69bf3bb0e088ed3eca770589849b0da'/>
<id>1c29610af69bf3bb0e088ed3eca770589849b0da</id>
<content type='text'>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * No change.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the library function cgroup_register_unchanged_process()
for notifying cgrulesengd daemon of the unchanged process.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * No change.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the library function cgroup_register_unchanged_process()
for notifying cgrulesengd daemon of the unchanged process.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the handler of unchanged process to cgrulesengd daemon.</title>
<updated>2009-06-29T11:17:32+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-06-26T05:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=afbbee67863b4debf4ec849ff3d6a3f1f21b73ef'/>
<id>afbbee67863b4debf4ec849ff3d6a3f1f21b73ef</id>
<content type='text'>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * No change.

Changelog of v4:
================
 * Add the comment "FIXME: Change the temporary file to configurable one."
 * Define the number of allocation.

Changelog of v3:
================
 * Set the value 0x1 to CGROUP_DAEMON_UNCHANGE_CHILDREN flag.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the handler of unchanged process to the cgrulesengd daemon.
By this patch, the daemon does not change a process which is executed by
'cgexec' command, because it is possible to notify the unchanged process to
the daemon by using "unix domain socket".

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * No change.

Changelog of v4:
================
 * Add the comment "FIXME: Change the temporary file to configurable one."
 * Define the number of allocation.

Changelog of v3:
================
 * Set the value 0x1 to CGROUP_DAEMON_UNCHANGE_CHILDREN flag.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the handler of unchanged process to the cgrulesengd daemon.
By this patch, the daemon does not change a process which is executed by
'cgexec' command, because it is possible to notify the unchanged process to
the daemon by using "unix domain socket".

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the key "process name" to find a matching rule.</title>
<updated>2009-06-29T11:17:32+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-06-26T05:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=495c45c844522c29ee4d0a26942e894f1346c237'/>
<id>495c45c844522c29ee4d0a26942e894f1346c237</id>
<content type='text'>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5.1:
==================
 * BUGFIX: Clear the flags meaning "found a matching rule"
   when a process name does not match.

   There was a problem that cgexec and cgclassify didn't work correctly
   if a user executes cgexec/cgclassify based on /etc/cgrules.conf.
   For example, if a root user executes `cgclassify $$` on the following
   /etc/cgrules.conf, the process ($$) should be moved to users/root on
   cpuset and memory subsystems. But the process was moved to users/root/cp
   on memory subsystem only.
     Example of /etc/cgrules.conf:
     =============================
     root:cp          cpuset  users/root/cp
     %                memory  users/root/cp
     root             cpuset  users/root
     %                memory  users/root

   The cause is why the flags meaning "found a matching rule" (uid, gid, and
   matched) is not cleared when a process name does not match. This problem
   is fixed on this patch.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * BUGFIX: Fix the handling of '%' in /etc/cgrules.conf.

Changelog of v2:
================
 * Use strcmp() instead of strncmp() for checking a process name strictly.
 * Some cleanups.

Description:
============
This patch adds the key "process name" to find a matching rule.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5.1:
==================
 * BUGFIX: Clear the flags meaning "found a matching rule"
   when a process name does not match.

   There was a problem that cgexec and cgclassify didn't work correctly
   if a user executes cgexec/cgclassify based on /etc/cgrules.conf.
   For example, if a root user executes `cgclassify $$` on the following
   /etc/cgrules.conf, the process ($$) should be moved to users/root on
   cpuset and memory subsystems. But the process was moved to users/root/cp
   on memory subsystem only.
     Example of /etc/cgrules.conf:
     =============================
     root:cp          cpuset  users/root/cp
     %                memory  users/root/cp
     root             cpuset  users/root
     %                memory  users/root

   The cause is why the flags meaning "found a matching rule" (uid, gid, and
   matched) is not cleared when a process name does not match. This problem
   is fixed on this patch.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * BUGFIX: Fix the handling of '%' in /etc/cgrules.conf.

Changelog of v2:
================
 * Use strcmp() instead of strncmp() for checking a process name strictly.
 * Some cleanups.

Description:
============
This patch adds the key "process name" to find a matching rule.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
